Commit 11f0b31
authored
Feature/add dke ping for health messages (#221)
* Remove Ar2QA and update URLs in QA
Deleted the `Ar2QA` class to eliminate redundancy and adjusted the URL constants in `QA` class to point to the correct QA environment. This streamlines the QA environment handling within the codebase.
* Add support for MQTT communication unit and DKE ping
Introduced MQTT_COMMUNICATION_UNIT in OnboardingResponseRepository and added a corresponding fixture. Updated certification details and added DKE_PING to SystemMessageType for improved system messaging capabilities.
* Add Ping Service implementation
Introduced PingService interface and its implementation, PingServiceImpl, to handle the pinging of health interfaces using MQTT protocol. Created PingParameters class for encapsulating ping request parameters and updated MessageEncoder to support encoding of ping messages. Also added a PingServiceTest class to validate the sending of health messages.
* Correct formatting in AbstractIntegrationTest
Fixed the indentation of the end-private-key line in AbstractIntegrationTest. Also removed unused import statements in PingServiceTest to clean up the code.
* Enable test and update registration code and onboarding response
Re-enabled the `onboardCommunicationUnitAndSaveToFile` test and updated its registration code. Also updated the `communication-unit.json` with new device and authentication details.
* Update farming software JSON and adjust onboarding test
Updated the `farming-software.json` with new device identifiers, connection criteria, and authentication details. Also, modified the test fixture to enable the onboarding test and updated the registration code accordingly.
* Add new onboarding response JSON and update test classes
Added a new `mqtt-communication-unit.json` file for onboarding responses. Corrected the file name reference in `OnboardingResponseRepository` and updated the registration code in the `MqttCommunicationUnitFixture` test case, while also re-enabling the previously disabled test.
* Update telemetry platform onboarding response and test fixture
Replaced telemetry platform onboarding details with new identifiers and updated the registration code in the test fixture. Also, enabled the previously disabled test for onboarding.
* Remove obsolete onboarding responses JSON files
Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository.
* Remove obsolete onboarding responses JSON files
Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository.
* Refactor MQTT test cases for better integration
Updated `PingServiceTest` to extend `AbstractIntegrationTest` and added necessary imports and services for MQTT testing. Modified `MqttCommunicationUnitFixture` to use MQTT instead of REST and added a logger for message delivery confirmation. Adjusted onboarding response JSON to match the new configuration.
* Enhance MQTT Ping Service tests and fix onboarding fixture
Refactored `PingServiceTest` to include message delivery and arrival checks. Updated `MqttCommunicationUnitFixture` to match the new test structure and modified the registration code in onboarding parameters. This ensures robust message handling and consistency in tests.
* Refactor `PingServiceTest` and enhance message handling.
Refactored the `PingServiceTest` to use instance variables instead of static. Enhance the `messageArrived` method to decode and validate incoming messages, improving test reliability and logging.
* Remove unused imports and exception handling
Removed unused import statements from three test classes to clean up the code. Additionally, eliminated the unnecessary throws declaration in `messageArrived` method in `PingServiceTest.java`.
* Update project version to 3.3.0
Bump the parent project and all sub-modules from version 3.2.1 to 3.3.0. This ensures all modules are aligned with the latest version for consistency.
* Refactor: Change async ping method to throw exception
The `sendAsync` method in `PingServiceImpl` now throws a `RuntimeException`, instructing users to use the synchronous method instead. This change ensures clarity on the method's availability and usage.1 parent 397b27c commit 11f0b31
25 files changed
Lines changed: 447 additions & 341 deletions
File tree
- agrirouter-sdk-java-api/src/main
- java/com/dke/data/agrirouter/api
- env
- service/messaging/mqtt
- kotlin/com/dke/data/agrirouter/api
- enums
- service/parameters
- agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging
- mqtt
- agrirouter-sdk-java-tests
- onboarding-responses
- src/test/java/com/dke/data/agrirouter/test
- fixture
- messaging
- mqtt
- rest
- onboarding
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | | - | |
| 8 | + | |
13 | 9 | | |
14 | 10 | | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
453 | 488 | | |
454 | 489 | | |
455 | 490 | | |
456 | 491 | | |
457 | 492 | | |
458 | 493 | | |
| 494 | + | |
459 | 495 | | |
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments