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 antonimaciej committed Feb 26, 2019
1 parent 4e3999e commit 452b9be
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 452b9be

Please sign in to comment.