Skip to content

Commit ef8d1af

Browse files
update tests
1 parent 3d5afc1 commit ef8d1af

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/bfd-pipeline-idr/test/test_pipeline.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def _test_pipeline_load(postgres_db: tuple[PostgresContainer, str], load_type: L
631631
logger.remove()
632632

633633

634-
def _test_load_progress_concurrent(conn: Connection[DictRow]) -> None:
634+
def _test_load_progress_concurrent(conn: Connection) -> None:
635635
cur = conn.execute("select * from idr.load_progress where job_id = 1")
636636
rows = cur.fetchmany(1)
637637
assert rows[0]["max_run_ts"] is None
@@ -652,7 +652,13 @@ def _test_load_progress_concurrent(conn: Connection[DictRow]) -> None:
652652
)
653653
rows = cur.fetchmany(1)
654654
assert rows_2[0]["max_run_ts"] == rows[0]["last_ts"]
655-
655+
# test table counts
656+
cur = conn.execute("select DISTINCT table_name from idr.load_progress where job_id = 1" \
657+
" EXCEPT " \
658+
"select DISTINCT table_name from idr.load_progress where job_id = 2")
659+
rows = cur.fetchmany(1)
660+
cur = conn.execute("select count(*) as row_count from idr.load_progress where job_id = 2")
661+
assert len(rows) == 0
656662

657663
def test_initial_pipeline_load(postgres_db: tuple[PostgresContainer, str]) -> None:
658664
_test_pipeline_load(postgres_db, LoadType.INITIAL)

0 commit comments

Comments
 (0)