diff --git a/python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py b/python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py index 5e3c2815c7988..e5f8ea80c2bb2 100644 --- a/python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py +++ b/python_modules/dagster/dagster_tests/storage_tests/utils/event_log_storage.py @@ -649,8 +649,23 @@ def test_event_log_storage_storage_id_pagination( storage.store_event(create_test_event_log_record(str(2), run_id=other_run_id)) storage.store_event(create_test_event_log_record("D", run_id=test_run_id)) - result = storage.get_records_for_run(test_run_id, ascending=True) - storage_ids = [r.storage_id for r in result.records] + desc_result = storage.get_records_for_run(test_run_id, ascending=False) + assert [r.event_log_entry.user_message for r in desc_result.records] == [ + "D", + "C", + "B", + "A", + ] + + asc_result = storage.get_records_for_run(test_run_id, ascending=True) + assert [r.event_log_entry.user_message for r in asc_result.records] == [ + "A", + "B", + "C", + "D", + ] + + storage_ids = [r.storage_id for r in asc_result.records] assert len(storage_ids) == 4 def _cursor(storage_id: int):