diff options
| author | Joshua Harlow <harlowja@yahoo-inc.com> | 2016-02-05 12:44:27 -0800 |
|---|---|---|
| committer | Joshua Harlow <harlowja@gmail.com> | 2016-02-14 11:43:35 -0800 |
| commit | a70bd8a7e59f52bc20dd4e219c4242b0f15664b4 (patch) | |
| tree | 54a6eb4a86651812fd907f9cef3518b4f457339d /taskflow/tests | |
| parent | 6cff7b27218377838295dffc3d16ad8ee6ddce4e (diff) | |
| download | taskflow-a70bd8a7e59f52bc20dd4e219c4242b0f15664b4.tar.gz | |
Remove need for separate notify thread
Instead of having a periodic notification thread that
will drop messages to try to find workers we can just
have this same work be done in the periodically called
on_wait callback that is already used for expiring and
matching workers to new/updated workers.
This avoids having one more thread that doesn't do all
that much (and activating it during waiting calls will
be often enough to achieve its goal in life).
Change-Id: If80233d13d914f2ed3665001a27627b78e6ee780
Diffstat (limited to 'taskflow/tests')
| -rw-r--r-- | taskflow/tests/unit/worker_based/test_executor.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/taskflow/tests/unit/worker_based/test_executor.py b/taskflow/tests/unit/worker_based/test_executor.py index 372f48b..d81fd78 100644 --- a/taskflow/tests/unit/worker_based/test_executor.py +++ b/taskflow/tests/unit/worker_based/test_executor.py @@ -85,8 +85,7 @@ class TestWorkerTaskExecutor(test.MockTestCase): on_wait=ex._on_wait, url=self.broker_url, transport=mock.ANY, transport_options=mock.ANY, - retry_options=mock.ANY, - type_handlers=mock.ANY), + retry_options=mock.ANY), mock.call.proxy.dispatcher.type_handlers.update(mock.ANY), ] self.assertEqual(master_mock_calls, self.master_mock.mock_calls) @@ -284,7 +283,7 @@ class TestWorkerTaskExecutor(test.MockTestCase): self.assertTrue(self.proxy_started_event.wait(test_utils.WAIT_TIMEOUT)) # start executor again - ex.start() + self.assertRaises(RuntimeError, ex.start) # stop executor ex.stop() |
