Skip to content

Commit

Permalink
[AIRFLOW-3885] Fix race condition in scheduler test (apache#4737)
Browse files Browse the repository at this point in the history
We're hitting this race condition frequently now that we don't sleep()
during unit tests. We don't actually need to assert that the task is
currently running - it's fine if it has already run successfully.
  • Loading branch information
astahlman authored and ashb committed Mar 8, 2019
1 parent f1ed955 commit e2e2beb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,7 @@ def run_with_error(task):
executor.do_update = True
do_schedule()
ti.refresh_from_db()
self.assertEqual(ti.state, State.RUNNING)
self.assertIn(ti.state, [State.RUNNING, State.SUCCESS])

@unittest.skipUnless("INTEGRATION" in os.environ, "Can only run end to end")
def test_retry_handling_job(self):
Expand Down

0 comments on commit e2e2beb

Please sign in to comment.