Skip to content

Commit

Permalink
Don't delete custom pools during test cleanup (#501)
Browse files Browse the repository at this point in the history
Only cleanup the test pool after completing sensor tests
  • Loading branch information
stacimc authored May 13, 2022
1 parent 971f396 commit 2045881
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from airflow.exceptions import AirflowException
from airflow.models import DagBag, DagRun, Pool, TaskInstance
from airflow.models.dag import DAG
from airflow.utils.db import add_default_pool_if_not_exists
from airflow.utils.session import create_session
from airflow.utils.state import State
from airflow.utils.timezone import datetime
Expand All @@ -25,8 +24,7 @@ def clean_db():
with create_session() as session:
session.query(DagRun).delete()
session.query(TaskInstance).delete()
session.query(Pool).delete()
add_default_pool_if_not_exists(session)
session.query(Pool).filter(id == TEST_POOL).delete()


def run_sensor(sensor):
Expand Down

0 comments on commit 2045881

Please sign in to comment.