You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/05/23 15:59:12 UTC
incubator-ariatosca git commit: minor fixes [Forced Update!]
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-185-NullPool-logging-messages-appear-during-execution 75ab5edac -> 57cebb998 (forced update)
minor fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/57cebb99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/57cebb99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/57cebb99
Branch: refs/heads/ARIA-185-NullPool-logging-messages-appear-during-execution
Commit: 57cebb998a342e4064cf3581d94b73fad63f199c
Parents: 8ce1ddd
Author: max-orlov <ma...@gigaspaces.com>
Authored: Tue May 23 18:49:19 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Tue May 23 18:59:07 2017 +0300
----------------------------------------------------------------------
aria/orchestrator/execution_plugin/ctx_proxy/client.py | 12 ++++++------
.../execution_plugin/test_ctx_proxy_server.py | 1 +
tests/orchestrator/workflows/executor/__init__.py | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/57cebb99/aria/orchestrator/execution_plugin/ctx_proxy/client.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/execution_plugin/ctx_proxy/client.py b/aria/orchestrator/execution_plugin/ctx_proxy/client.py
index f58c727..fbfff57 100644
--- a/aria/orchestrator/execution_plugin/ctx_proxy/client.py
+++ b/aria/orchestrator/execution_plugin/ctx_proxy/client.py
@@ -45,7 +45,7 @@ def _http_request(socket_url, request, method, timeout):
return json.loads(response.read())
-def _client_request(socket_url, args, method, timeout):
+def _client_request(socket_url, args, timeout, method='POST'):
response = _http_request(
socket_url=socket_url,
request={'args': args},
@@ -90,15 +90,15 @@ def _process_args(json_prefix, args):
def _close_session(socket_url, timeout):
- return _client_request(socket_url, [], 'DELETE', timeout)
+ return _client_request(socket_url, [], timeout, 'DELETE')
def main(args=None):
try:
args = _parse_args(args)
- response = _client_request(args.socket_url,
+ response = _client_request(
+ args.socket_url,
args=_process_args(args.json_arg_prefix, args.args),
- method='POST',
timeout=args.timeout)
if args.json_output:
response = json.dumps(response)
@@ -107,11 +107,11 @@ def main(args=None):
response = ''
response = str(response)
sys.stdout.write(response)
- except BaseException:
+ except BaseException as origial_e:
try:
_close_session(args.socket_url, args.timeout)
except BaseException:
- pass
+ raise origial_e
if __name__ == '__main__':
main()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/57cebb99/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 98ceff9..c94bae7 100644
--- a/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
+++ b/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
@@ -165,6 +165,7 @@ class TestCtxProxy(object):
@pytest.fixture
def server(self, ctx):
result = ctx_proxy.server.CtxProxy(ctx)
+ result._close_session = lambda *args, **kwargs: {}
yield result
result.close()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/57cebb99/tests/orchestrator/workflows/executor/__init__.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/executor/__init__.py b/tests/orchestrator/workflows/executor/__init__.py
index 1a462ca..375c44e 100644
--- a/tests/orchestrator/workflows/executor/__init__.py
+++ b/tests/orchestrator/workflows/executor/__init__.py
@@ -73,4 +73,4 @@ class MockContext(object):
if kwargs:
return cls(storage=aria.application_model_storage(**kwargs))
else:
- return cls()
\ No newline at end of file
+ return cls()