Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.scheduler.tests.test_journal_client::test_journal_client_origin_visit_statuses_same_snapshot_permutation[visit_statuses4]
Failed

TEST RESULT

Run At
Jul 8 2021, 10:32 AM
Details
visit_statuses = ({'date': datetime.datetime(2023, 7, 8, 8, 31, 34, 245474, tzinfo=datetime.timezone.utc), 'origin': 'cavabarder', 'sna...cavabarder', 'snapshot': b'\xaa\xaa\xaa\xbb\xbe\xb6\xcf\x9e\xfd[\x92\n\x84S\xe1\xe0qW\xb6\xcd', 'status': 'full', ...}) swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7f95ede11400> @pytest.mark.parametrize( "visit_statuses", permutations(VISIT_STATUSES_SAME_SNAPSHOT, len(VISIT_STATUSES_SAME_SNAPSHOT)), ) def test_journal_client_origin_visit_statuses_same_snapshot_permutation( visit_statuses, swh_scheduler ): """Ensure out of order topic subscription ends up in the same final state """ process_journal_objects( {"origin_visit_status": visit_statuses}, scheduler=swh_scheduler ) actual_origin_visit_stats = swh_scheduler.origin_visit_stats_get( [("cavabarder", "hg")] ) assert_visit_stats_ok( actual_origin_visit_stats, [ OriginVisitStats( url="cavabarder", visit_type="hg", last_eventful=DATE1, last_uneventful=DATE1 + 2 * ONE_YEAR, last_failed=None, last_notfound=None, last_snapshot=hash_to_bytes("aaaaaabbbeb6cf9efd5b920a8453e1e07157b6cd"), next_position_offset=6, # 2 uneventful visits, whatever the permutation ) ], > compare_successive_visits=False, # depending on permutations, result change ) .tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_journal_client.py:830: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ actual_visit_stats = [] expected_visit_stats = [OriginVisitStats(url='cavabarder', visit_type='hg', last_eventful=datetime.datetime(2021, 7, 6, 8, 31, 34, 245474, tz...f\x9e\xfd[\x92\n\x84S\xe1\xe0qW\xb6\xcd', next_visit_queue_position=None, next_position_offset=6, successive_visits=0)] compare_successive_visits = False def assert_visit_stats_ok( actual_visit_stats, expected_visit_stats, compare_successive_visits=True ): """Utility test function to ensure visits stats read from the backend are in the right shape. The comparison on the next_visit_queue_position will be dealt with in dedicated tests so it's not tested in tests that are calling this function. """ > assert len(actual_visit_stats) == len(expected_visit_stats) E assert 0 == 1 E +0 E -1 .tox/py3/lib/python3.7/site-packages/swh/scheduler/tests/test_journal_client.py:144: AssertionError