Skip to content

Commit

Permalink
fix test, order dagrun by execution date
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavaniravi committed Sep 23, 2021
1 parent c17bb00 commit 45b9d4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/operators/test_trigger_dagrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ def test_trigger_dagrun_triggering_itself(self):
task.run(start_date=execution_date, end_date=execution_date)

with create_session() as session:
dagruns = session.query(DagRun).filter(DagRun.dag_id == self.dag.dag_id).all()
dagruns = (
session.query(DagRun)
.filter(DagRun.dag_id == self.dag.dag_id)
.order_by(DagRun.execution_date)
.all()
)
assert len(dagruns) == 2
assert dagruns[1].state == State.QUEUED

Expand Down

0 comments on commit 45b9d4f

Please sign in to comment.