Skip to content

Commit

Permalink
update query count
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Oct 18, 2024
1 parent b16d951 commit ebfa65c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/models/test_serialized_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class TestSerializedDagModel:
],
)
def setup_test_cases(self, request, monkeypatch):
db.clear_db_dags()
db.clear_db_serialized_dags()
with mock.patch("airflow.models.serialized_dag.COMPRESS_SERIALIZED_DAGS", request.param):
yield
Expand Down Expand Up @@ -191,7 +192,9 @@ def test_bulk_sync_to_db(self):
DAG("dag_3", schedule=None),
]
DAG.bulk_write_to_db(dags)
with assert_queries_count(15): # we also write to dag_version and dag_code tables
# we also write to dag_version and dag_code tables
# in dag_version, we search for unique version_name too
with assert_queries_count(21):
SDM.bulk_sync_to_db(dags)

@pytest.mark.skip_if_database_isolation_mode # Does not work in db isolation mode
Expand Down

0 comments on commit ebfa65c

Please sign in to comment.