Repository: incubator-airflow
Updated Branches:
  refs/heads/master cdfced324 -> cb868f49f


[AIRFLOW-1631] Fix timing issue in unit test

LocalWorker instances wait 1 sec for each unit of
work they perform, so
getting the response of a processor takes at least
1 sec after the unit
of work.

Increasing timeout in
LocalTaskJobTest.test_mark_success_no_kill and
decreasing the poking time on local executor
checking for results in the
unlimited implementation.

Closes #2699 from edgarRd/erod-fix-timing-failure


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/cb868f49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/cb868f49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/cb868f49

Branch: refs/heads/master
Commit: cb868f49f0b6144bd6488cbde5bdf2811001f6ac
Parents: cdfced3
Author: Edgar Rodriguez <[email protected]>
Authored: Tue Oct 17 17:51:34 2017 -0700
Committer: Dan Davydov <[email protected]>
Committed: Tue Oct 17 17:51:58 2017 -0700

----------------------------------------------------------------------
 airflow/executors/local_executor.py | 2 +-
 tests/jobs.py                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/cb868f49/airflow/executors/local_executor.py
----------------------------------------------------------------------
diff --git a/airflow/executors/local_executor.py 
b/airflow/executors/local_executor.py
index 9b4f8e1..71bee22 100644
--- a/airflow/executors/local_executor.py
+++ b/airflow/executors/local_executor.py
@@ -160,7 +160,7 @@ class LocalExecutor(BaseExecutor):
         def end(self):
             while self.executor.workers_active > 0:
                 self.executor.sync()
-                time.sleep(1)
+                time.sleep(0.5)
 
     class _LimitedParallelism(object):
         """Implements LocalExecutor with limited parallelism using a task 
queue to

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/cb868f49/tests/jobs.py
----------------------------------------------------------------------
diff --git a/tests/jobs.py b/tests/jobs.py
index ba08fd6..88589d8 100644
--- a/tests/jobs.py
+++ b/tests/jobs.py
@@ -860,7 +860,7 @@ class LocalTaskJobTest(unittest.TestCase):
         session.merge(ti)
         session.commit()
 
-        process.join(timeout=5)
+        process.join(timeout=10)
         self.assertFalse(process.is_alive())
         ti.refresh_from_db()
         self.assertEqual(State.SUCCESS, ti.state)

Reply via email to