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 wayne.morris committed Jul 29, 2019
1 parent bea9db6 commit 3510487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3249,7 +3249,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 3510487

Please sign in to comment.