skupperproject / skupper-router

An application-layer router for Skupper networks
https://skupper.io
Apache License 2.0
14 stars 18 forks source link

autoLink test failure: AutoLinkRetryTest::test_auto_link_reattach - AssertionError: 'attaching' != 'failed' #578

Open kgiusti opened 2 years ago

kgiusti commented 2 years ago

https://github.com/skupperproject/skupper-router/runs/7093416373?check_suite_focus=true#step:9:2306

2022-06-28T13:24:20.0871083Z 15: self = 2022-06-28T13:24:20.0871361Z 15: 2022-06-28T13:24:20.0871563Z 15: def test_auto_link_reattach(self): 2022-06-28T13:24:20.0871971Z 15: long_type = 'io.skupper.router.router.config.autoLink' 2022-06-28T13:24:20.0872531Z 15: query_command = 'QUERY --type=' + long_type 2022-06-28T13:24:20.0872836Z 15: output = json.loads(self.run_skmanage(query_command)) 2022-06-28T13:24:20.0873062Z 15:
2022-06-28T13:24:20.0873396Z 15: # Since the distribution of the autoLinked address 'examples' 2022-06-28T13:24:20.0873734Z 15: # is set to unavailable, the link route will initially be in the 2022-06-28T13:24:20.0903206Z 15: # failed state 2022-06-28T13:24:20.0903939Z 15: > self.assertEqual(output[0]['operStatus'], 'failed') 2022-06-28T13:24:20.0904420Z 15: E AssertionError: 'attaching' != 'failed' 2022-06-28T13:24:20.0904813Z 15: E - attaching 2022-06-28T13:24:20.0905167Z 15: E + failed 2022-06-28T13:24:20.0913522Z 15: 2022-06-28T13:24:20.0915039Z 15: /home/runner/work/skupper-router/skupper-router/skupper-router/tests/system_tests_autolinks.py:264: AssertionError 2022-06-28T13:24:20.0915923Z 15: ---------------------------------------------------------------------- Captured log setup ---------------------------------------------------------------------- 2022-06-28T13:24:20.0916904Z 15: INFO  proton:_reactor.py:1053 Connecting to Url('amqp://127.0.0.1:28540')... 2022-06-28T13:24:20.0948040Z 15: INFO  proton:_reactor.py:1091 Connected to 127.0.0.1 2022-06-28T13:24:20.0948909Z 15: -------------------------------------------------------------------- Captured log teardown --------------------------------------------------------------------- 2022-06-28T13:24:20.0950052Z 15: INFO  proton:_reactor.py:1105 Disconnected, already closed 2022-06-28T13:24:20.0950842Z 15: ------------- generated xml file: /home/runner/work/skupper-router/skupper-router/skupper-router/build/tests/junitxmls/system_tests_autolinks.xml -------------- 2022-06-28T13:24:20.0951827Z 15: =================================================================== short test summary info ==================================================================== 2022-06-28T13:24:20.0952512Z 15: FAILED ::AutoLinkRetryTest::test_auto_link_reattach - AssertionError: 'attaching' != 'failed'

kgiusti commented 2 years ago

The test fails because it did not account for the temporary initial state of "attaching". The test should ignore that state and keep retrying until either the failed state is hit or the test times out.