Skip to content
Snippets Groups Projects
Commit 3771edba authored by Antoine Lambert's avatar Antoine Lambert
Browse files

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.
parent 33a8b959
No related branches found
No related tags found
No related merge requests found
......@@ -392,4 +392,6 @@ def test_client_with_deserializer(
client.consumer.commit()
# Check the first revision has not been passed to worker_fn
worker_fn.assert_called_once_with({"revision": revisions[1:]})
processed_revisions = set(worker_fn.call_args[0][0]["revision"])
assert revisions[0] not in processed_revisions
assert all(rev in processed_revisions for rev in revisions[1:])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment