Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the REST functional tests by adding timeout handling to the test server and modifying the device collection update task parameters. The review feedback suggests increasing the expect timeout in the test server to 150 seconds to prevent flaky failures and increasing the wait_for_action timeout in the Python test script to 15 seconds to account for potential latency.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3656 +/- ##
==========================================
- Coverage 55.77% 48.42% -7.36%
==========================================
Files 87 153 +66
Lines 6890 20460 +13570
Branches 0 1625 +1625
==========================================
+ Hits 3843 9907 +6064
- Misses 3047 9931 +6884
- Partials 0 622 +622 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
174b8df to
9c9869e
Compare
- Use `updateDeviceCollectionTask` with `"deviceCount": 1` in `api_network_diagnostic_task_test()` in `tests/rest/test_rest.py` instead of the invalid action type `updateNetworkDevicesTask`. - Exit with `$status` in `tests/rest/test-rest-server` so `test_rest.py` failures are not masked by `kill $AGENT_PID`. - Initialize TLV arrays and counts in `NetworkDiagHandler`, reset `mDiagReqTlvsOmitableCount` in `SetDefaultTlvs()`, and bound query iteration by `mDiagQueryTlvsCount` in `HandleNextDiagQuery()`.
9c9869e to
b23abbb
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the NetworkDiagHandler class by properly initializing several member variables in its constructor, setting default TLV values, and changing a range-based loop to an index-based loop using mDiagQueryTlvsCount. Additionally, it updates the REST API integration tests by adjusting the test task type to updateDeviceCollectionTask, increasing timeouts, and handling test execution status and timeouts more robustly. There are no review comments to address, so no further feedback is provided.
In api_network_diagnostic_task_test() (added in #3632), POST /api/actions used the invalid action type 'updateNetworkDevicesTask' and omitted the required 'deviceCount' attribute, causing RestWebServer::ApiActionsPostHandler to reject the request with HTTP 422. Because tests/rest/test-rest-server previously checked only Expect's OS wait error flag ($error) and not the process exit status ($status), the unhandled HTTPError in test_rest.py was silently ignored.
This commit: