Bug report
test_a_scoped_item_says_what_its_templated_sibling_says in src/ros2_medkit_integration_tests/test/features/test_openapi_contract.test.py asserts that at least one item of each collection carried x-sovd-name, so that the comparison it makes is not vacuous. For operations that item exists only after the gateway has discovered the demo node's services.
The suite does not wait for that. spec() fetches /docs as soon as the answer has an openapi key, which the gateway serves before discovery has run. On a loaded runner the document can still be free of operations at that moment, and the test fails with
AssertionError: 0 not greater than 0 : no operations sub-document published a cache-derived item
(none carried x-sovd-name); every comparison over operations was vacuous
Steps to reproduce
- Run
colcon test --packages-select ros2_medkit_integration_tests --ctest-args -R test_openapi_contract on a machine under load.
- Repeat until the gateway answers
/docs before the demo node's services are in the cache.
Expected behavior
The test waits until the gateway has the operations it is about to compare, then asserts.
Actual behavior
The test asserts against whatever the gateway had at the first answer, and fails when discovery had not finished.
Environment
- ros2_medkit version: main
- ROS 2 distro: jazzy
- OS: Ubuntu 24.04
Additional information
Seen on a CI run of the jazzy-test job; the same job passed on a re-run of the same commit. The guard that reports the vacuous comparison is doing its job: the document really had no operation to compare. The precondition is what needs to change.
Bug report
test_a_scoped_item_says_what_its_templated_sibling_saysinsrc/ros2_medkit_integration_tests/test/features/test_openapi_contract.test.pyasserts that at least one item of each collection carriedx-sovd-name, so that the comparison it makes is not vacuous. Foroperationsthat item exists only after the gateway has discovered the demo node's services.The suite does not wait for that.
spec()fetches/docsas soon as the answer has anopenapikey, which the gateway serves before discovery has run. On a loaded runner the document can still be free of operations at that moment, and the test fails withSteps to reproduce
colcon test --packages-select ros2_medkit_integration_tests --ctest-args -R test_openapi_contracton a machine under load./docsbefore the demo node's services are in the cache.Expected behavior
The test waits until the gateway has the operations it is about to compare, then asserts.
Actual behavior
The test asserts against whatever the gateway had at the first answer, and fails when discovery had not finished.
Environment
Additional information
Seen on a CI run of the
jazzy-testjob; the same job passed on a re-run of the same commit. The guard that reports the vacuous comparison is doing its job: the document really had no operation to compare. The precondition is what needs to change.