Skip to content
Snippets Groups Projects

test_client: Fix failing test since recent swh-model update

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

Closed by Phabricator Migration userPhabricator Migration user 2 years ago (Mar 24, 2022 2:36pm UTC)

Merge details

  • The changes were not merged into .

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
Loading