Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-185-NullPool-logging-messages-appear-during-execution 0f2df7d1b -> 1d98728d8
minor fixups Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/1d98728d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/1d98728d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/1d98728d Branch: refs/heads/ARIA-185-NullPool-logging-messages-appear-during-execution Commit: 1d98728d84c180a1f1234459966b0d8c1e6a31fe Parents: 0f2df7d Author: max-orlov <[email protected]> Authored: Wed May 24 01:25:20 2017 +0300 Committer: max-orlov <[email protected]> Committed: Wed May 24 01:25:20 2017 +0300 ---------------------------------------------------------------------- aria/orchestrator/execution_plugin/ctx_proxy/server.py | 2 +- aria/orchestrator/workflows/executor/process.py | 3 --- tests/orchestrator/execution_plugin/test_ctx_proxy_server.py | 3 ++- 3 files changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d98728d/aria/orchestrator/execution_plugin/ctx_proxy/server.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/execution_plugin/ctx_proxy/server.py b/aria/orchestrator/execution_plugin/ctx_proxy/server.py index d9195ff..2e17674 100644 --- a/aria/orchestrator/execution_plugin/ctx_proxy/server.py +++ b/aria/orchestrator/execution_plugin/ctx_proxy/server.py @@ -41,7 +41,7 @@ class CtxProxy(object): self._started = Queue.Queue(1) self._terminated = Queue.Queue(1) self.thread = self._start_server() - self._started.get(timeout=50) + self._started.get(timeout=5) def _start_server(self): proxy = self http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d98728d/aria/orchestrator/workflows/executor/process.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/workflows/executor/process.py b/aria/orchestrator/workflows/executor/process.py index 23cf9ff..da6bbb2 100644 --- a/aria/orchestrator/workflows/executor/process.py +++ b/aria/orchestrator/workflows/executor/process.py @@ -387,16 +387,13 @@ def _main(): for decorate in process_executor.decorate(): task_func = decorate(task_func) task_func(ctx=ctx, **operation_inputs) - ctx.close() messenger.succeeded(tracked_changes=instrument.tracked_changes, new_instances=instrument.new_instances) except BaseException as e: - ctx.close() messenger.failed(exception=e, tracked_changes=instrument.tracked_changes, new_instances=instrument.new_instances) finally: - ctx.close() instrument.expunge_session() if __name__ == '__main__': http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1d98728d/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py b/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py index c94bae7..1b19fd9 100644 --- a/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py +++ b/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py @@ -136,7 +136,7 @@ class TestCtxProxy(object): kwargs=kwargs) @pytest.fixture - def ctx(self): + def ctx(self, mocker): class MockCtx(object): pass ctx = MockCtx() @@ -160,6 +160,7 @@ class TestCtxProxy(object): ctx.stub_args = self.stub_args ctx.stub_attr = self.StubAttribute() ctx.node = self.NodeAttribute(properties) + ctx.model = mocker.MagicMock() return ctx @pytest.fixture
