test_client: Fix failing test since recent swh-model update
Closed
requested to merge generated-differential-D7422-source into generated-differential-D7422-target
1 unresolved thread
swh.model.tests.swh_model_data.TEST_OBJECTS["revision"] now has three sample revisions resulting in two revisions being processed by kafka consumer in test_client_with_deserializer.
As there is no guarantee on the order messages are processed by kafka consumer, we need to update test implementation to avoid failures.
Migrated from D7422 (view on Phabricator)
Merge request reports
Activity
Filter activity
Build has FAILED
Patch application report for D7422 (id=26861)
Rebasing onto 33a8b959...
Current branch diff-target is up to date.
Changes applied before test
commit 4e64c9266870a3cd9ac44b072cc24d500f422974 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Thu Mar 24 14:30:40 2022 +0100 test_client: Fix failing test since recent swh-model update swh.model.tests.swh_model_data.TEST_OBJECTS["revision"] now has three sample revisions resulting in two revisions being processed by kafka consumer in test_client_with_deserializer. As there is no guarantee on the order messages are processed by kafka consumer, we need to update test implementation to avoid failures.
Link to build: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/196/ See console output for more information: https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/196/console
Build is green
Patch application report for D7422 (id=26862)
Rebasing onto 33a8b959...
Current branch diff-target is up to date.
Changes applied before test
commit 3771edbab33dd220c6ec9bf32dee9b10947f55ef Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Thu Mar 24 14:30:40 2022 +0100 test_client: Fix failing test since recent swh-model update swh.model.tests.swh_model_data.TEST_OBJECTS["revision"] now has three sample revisions resulting in two revisions being processed by kafka consumer in test_client_with_deserializer. As there is no guarantee on the order messages are processed by kafka consumer, we need to update test implementation to avoid failures.
See https://jenkins.softwareheritage.org/job/DJNL/job/tests-on-diff/197/ for more details.
392 392 client.consumer.commit() 393 393 394 394 # Check the first revision has not been passed to worker_fn 395 worker_fn.assert_called_once_with({"revision": revisions[1:]}) 395 processed_revisions = set(worker_fn.call_args[0][0]["revision"]) 396 assert revisions[0] not in processed_revisions 397 assert all(rev in processed_revisions for rev in revisions[1:])
Please register or sign in to reply