You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/25 06:18:32 UTC
[GitHub] [airflow] feng-tao commented on a change in pull request #4968:
[AIRFLOW-XXX] Fix race condition in CI test
feng-tao commented on a change in pull request #4968: [AIRFLOW-XXX] Fix race condition in CI test
URL: https://github.com/apache/airflow/pull/4968#discussion_r268499736
##########
File path: tests/test_jobs.py
##########
@@ -2553,7 +2553,7 @@ def test_dagrun_root_after_dagrun_unfinished(self):
ti_ids = [(ti.task_id, ti.state) for ti in first_run.get_task_instances()]
self.assertEqual(ti_ids, [('current', State.SUCCESS)])
- self.assertEqual(first_run.state, State.SUCCESS)
+ self.assertIn(first_run.state, [State.SUCCESS, State.RUNNING])
Review comment:
I think in real scenario it will only have success state for the task. The issue only happens in unit test as we don't wait / sleep to retrieve the result during CI test for speeding up the CI test effort hence we sometimes(or in some ORM) get the running state for the task
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services