incubator-ariatosca git commit: tests fix and exception msg [Forced Update!]
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-79-concurrent-storage-modifications 5af1a8f23 -> ab138d4d7 (forced update) tests fix and exception msg Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ab138d4d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ab138d4d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ab138d4d Branch: refs/heads/ARIA-79-concurrent-storage-modifications Commit: ab138d4d7d82fec44288f96bc8dca9f2c7248b80 Parents: 4a72e11 Author: mxmrlv Authored: Thu Feb 16 13:06:35 2017 +0200 Committer: mxmrlv Committed: Thu Feb 16 16:36:47 2017 +0200 -- aria/orchestrator/workflows/executor/process.py | 3 +- aria/storage/instrumentation.py | 40 --- aria/storage/modeling/instance_elements.py | 5 +- aria/storage_initializer.py | 1 - tests/mock/models.py| 2 - ...process_executor_concurrent_modifications.py | 109 +-- tests/storage/test_structures.py| 1 - 7 files changed, 82 insertions(+), 79 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ab138d4d/aria/orchestrator/workflows/executor/process.py -- diff --git a/aria/orchestrator/workflows/executor/process.py b/aria/orchestrator/workflows/executor/process.py index a23e3da..84f5f58 100644 --- a/aria/orchestrator/workflows/executor/process.py +++ b/aria/orchestrator/workflows/executor/process.py @@ -227,6 +227,8 @@ class ProcessExecutor(base.BaseExecutor): try: self._apply_tracked_changes(task, request) except BaseException as e: +e.message = \ +'{0} Remote task execution failed due: {1}'.format(str(e), request['exception']) self._task_failed(task, exception=e) else: self._task_failed(task, exception=request['exception']) @@ -364,7 +366,6 @@ def _main(): # This is required for the instrumentation work properly. # See docstring of `remove_mutable_association_listener` for further details storage_type.remove_mutable_association_listener() - with instrumentation.track_changes() as instrument: try: ctx = context_dict['context_cls'].deserialize_from_dict(**context_dict['context']) http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ab138d4d/aria/storage/instrumentation.py -- diff --git a/aria/storage/instrumentation.py b/aria/storage/instrumentation.py index 41818b6..b3ca24a 100644 --- a/aria/storage/instrumentation.py +++ b/aria/storage/instrumentation.py @@ -14,6 +14,7 @@ # limitations under the License. import copy +import json import sqlalchemy import sqlalchemy.event @@ -22,7 +23,7 @@ from . import exceptions from .modeling import model as _model -_VERSION_ID_COL = 'version_id' +_VERSION_ID_COL = 'version' _STUB = object() _INSTRUMENTED = { _model.Node.runtime_properties: dict @@ -162,18 +163,31 @@ def apply_tracked_changes(tracked_changes, model): returned by calling ``track_changes()`` :param model: The model storage used to actually apply the changes """ -for mapi_name, tracked_instances in tracked_changes.items(): -mapi = getattr(model, mapi_name) -for instance_id, tracked_attributes in tracked_instances.items(): -instance = None -for attribute_name, value in tracked_attributes.items(): -if value.initial != value.current: -if not instance: -instance = mapi.get(instance_id) -setattr(instance, attribute_name, value.current) -if instance: -_validate_version_id(instance, mapi) -mapi.update(instance) +successfully_updated_instances = dict() +try: +for mapi_name, tracked_instances in tracked_changes.items(): +successfully_updated_instances[mapi_name] = list() +mapi = getattr(model, mapi_name) +for instance_id, tracked_attributes in tracked_instances.items(): +instance = None +for attribute_name, value in tracked_attributes.items(): +if value.initial != value.current: +if not instance: +instance = mapi.get(instance_id) +setattr(instance, attribute_name, value.current) +if instance: +_validate_version_id(instance, mapi) +mapi.update(instance) + su
[12/13] incubator-ariatosca git commit: tests fix
tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e6d68d73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e6d68d73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e6d68d73 Branch: refs/heads/ARIA-79-concurrent-storage-modifications Commit: e6d68d73654f06551f2266a32badf561e505cf07 Parents: 4a72e11 Author: mxmrlv Authored: Thu Feb 16 13:06:35 2017 +0200 Committer: mxmrlv Committed: Thu Feb 16 15:03:40 2017 +0200 -- aria/orchestrator/workflows/executor/process.py | 5 ++ ...process_executor_concurrent_modifications.py | 74 2 files changed, 34 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6d68d73/aria/orchestrator/workflows/executor/process.py -- diff --git a/aria/orchestrator/workflows/executor/process.py b/aria/orchestrator/workflows/executor/process.py index a23e3da..655d75d 100644 --- a/aria/orchestrator/workflows/executor/process.py +++ b/aria/orchestrator/workflows/executor/process.py @@ -366,6 +366,7 @@ def _main(): storage_type.remove_mutable_association_listener() with instrumentation.track_changes() as instrument: +# import pydevd; pydevd.settrace('localhost') try: ctx = context_dict['context_cls'].deserialize_from_dict(**context_dict['context']) _patch_session(ctx=ctx, messenger=messenger, instrument=instrument) @@ -376,6 +377,10 @@ def _main(): task_func(ctx=ctx, **operation_inputs) messenger.succeeded(tracked_changes=instrument.tracked_changes) except BaseException as e: +# import traceback +# with open('/home/maxim/Desktop/tmp_log', 'wr+') as f: +# traceback.print_exc(file=f) + messenger.failed(exception=e, tracked_changes=instrument.tracked_changes) http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6d68d73/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py -- diff --git a/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py b/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py index 7c54bc5..e46921e 100644 --- a/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py +++ b/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - import time import json @@ -33,34 +32,34 @@ from tests import mock from tests import storage -def test_concurrent_modification_on_task_succeeded(context, executor, shared_file): -_test(context, executor, shared_file, _test_task_succeeded, expected_failure=True) +def test_concurrent_modification_on_task_succeeded(context, executor, lock_files): +_test(context, executor, lock_files, _test_task_succeeded, expected_failure=True) @operation -def _test_task_succeeded(ctx, shared_file, key, first_value, second_value): -_concurrent_update(shared_file, ctx.node_instance, key, first_value, second_value) +def _test_task_succeeded(ctx, lock_files, key, first_value, second_value): +_concurrent_update(lock_files, ctx.node_instance, key, first_value, second_value) -def test_concurrent_modification_on_task_failed(context, executor, shared_file): -_test(context, executor, shared_file, _test_task_failed, expected_failure=True) +def test_concurrent_modification_on_task_failed(context, executor, lock_files): +_test(context, executor, lock_files, _test_task_failed, expected_failure=True) @operation -def _test_task_failed(ctx, shared_file, key, first_value, second_value): -first = _concurrent_update(shared_file, ctx.node_instance, key, first_value, second_value) +def _test_task_failed(ctx, lock_files, key, first_value, second_value): +first = _concurrent_update(lock_files, ctx.node_instance, key, first_value, second_value) if not first: raise RuntimeError('MESSAGE') -def test_concurrent_modification_on_update_and_refresh(context, executor, shared_file): -_test(context, executor, shared_file, _test_update_and_refresh, expected_failure=False) +def test_concurrent_modification_on_update_and_refresh(context, executor, lock_files): +_test(context, executor, lock_files, _test_update_and_refresh, expected_failure=False) @operation -def _test_update_and_refresh(ctx, sh
incubator-ariatosca git commit: tests fix
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-79-concurrent-storage-modifications 1b03bf211 -> b77070899 tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b7707089 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b7707089 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b7707089 Branch: refs/heads/ARIA-79-concurrent-storage-modifications Commit: b77070899e9f2113973d9a65fdc9a95b35d996fb Parents: 1b03bf2 Author: mxmrlv Authored: Thu Feb 16 13:06:35 2017 +0200 Committer: mxmrlv Committed: Thu Feb 16 13:06:35 2017 +0200 -- aria/orchestrator/workflows/executor/process.py | 5 ++ ...process_executor_concurrent_modifications.py | 74 2 files changed, 34 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b7707089/aria/orchestrator/workflows/executor/process.py -- diff --git a/aria/orchestrator/workflows/executor/process.py b/aria/orchestrator/workflows/executor/process.py index 319982e..2c563a8 100644 --- a/aria/orchestrator/workflows/executor/process.py +++ b/aria/orchestrator/workflows/executor/process.py @@ -366,6 +366,7 @@ def _main(): storage_type.remove_mutable_association_listener() with instrumentation.track_changes() as instrument: +# import pydevd; pydevd.settrace('localhost') try: ctx = serialization.operation_context_from_dict(context_dict) _patch_session(ctx=ctx, messenger=messenger, instrument=instrument) @@ -376,6 +377,10 @@ def _main(): task_func(ctx=ctx, **operation_inputs) messenger.succeeded(tracked_changes=instrument.tracked_changes) except BaseException as e: +# import traceback +# with open('/home/maxim/Desktop/tmp_log', 'wr+') as f: +# traceback.print_exc(file=f) + messenger.failed(exception=e, tracked_changes=instrument.tracked_changes) if __name__ == '__main__': http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b7707089/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py -- diff --git a/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py b/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py index 7c54bc5..e46921e 100644 --- a/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py +++ b/tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py @@ -12,7 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - import time import json @@ -33,34 +32,34 @@ from tests import mock from tests import storage -def test_concurrent_modification_on_task_succeeded(context, executor, shared_file): -_test(context, executor, shared_file, _test_task_succeeded, expected_failure=True) +def test_concurrent_modification_on_task_succeeded(context, executor, lock_files): +_test(context, executor, lock_files, _test_task_succeeded, expected_failure=True) @operation -def _test_task_succeeded(ctx, shared_file, key, first_value, second_value): -_concurrent_update(shared_file, ctx.node_instance, key, first_value, second_value) +def _test_task_succeeded(ctx, lock_files, key, first_value, second_value): +_concurrent_update(lock_files, ctx.node_instance, key, first_value, second_value) -def test_concurrent_modification_on_task_failed(context, executor, shared_file): -_test(context, executor, shared_file, _test_task_failed, expected_failure=True) +def test_concurrent_modification_on_task_failed(context, executor, lock_files): +_test(context, executor, lock_files, _test_task_failed, expected_failure=True) @operation -def _test_task_failed(ctx, shared_file, key, first_value, second_value): -first = _concurrent_update(shared_file, ctx.node_instance, key, first_value, second_value) +def _test_task_failed(ctx, lock_files, key, first_value, second_value): +first = _concurrent_update(lock_files, ctx.node_instance, key, first_value, second_value) if not first: raise RuntimeError('MESSAGE') -def test_concurrent_modification_on_update_and_refresh(context, executor, shared_file): -_test(context, executor, shared_file, _test_update_and_refresh, expected_failure=False) +def test_concurrent_modification_on_update_and_refresh(context, executor, lock_files): +_test(co
incubator-ariatosca git commit: tests fix [Forced Update!]
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-3-api-for-creating-workflows 16f76c611 -> b1b1a554e (forced update) tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b1b1a554 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b1b1a554 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b1b1a554 Branch: refs/heads/ARIA-3-api-for-creating-workflows Commit: b1b1a554efcdda3e18b43721c3eae4107d2a6c65 Parents: 3d1c8b1 Author: mxmrlv Authored: Mon Oct 31 15:29:16 2016 +0200 Committer: mxmrlv Committed: Tue Nov 1 11:20:31 2016 +0200 -- aria/.pylintrc | 2 +- aria/storage/drivers.py| 2 +- aria/workflows/api/task_graph.py | 5 + aria/workflows/builtin/workflows.py| 17 ++--- aria/workflows/core/executor.py| 5 ++--- tests/.pylintrc| 6 +++--- tests/test_logger.py | 2 +- tests/workflows/api/test_task_graph.py | 5 - tests/workflows/core/test_executor.py | 6 +++--- tox.ini| 4 ++-- 10 files changed, 32 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b1b1a554/aria/.pylintrc -- diff --git a/aria/.pylintrc b/aria/.pylintrc index eb188a0..ee27fdb 100644 --- a/aria/.pylintrc +++ b/aria/.pylintrc @@ -62,7 +62,7 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,redefined-builtin,logging-format-interpolation +disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,redefined-builtin,logging-format-interpolation,import-error [REPORTS] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b1b1a554/aria/storage/drivers.py -- diff --git a/aria/storage/drivers.py b/aria/storage/drivers.py index 33b7c00..0ad2f49 100644 --- a/aria/storage/drivers.py +++ b/aria/storage/drivers.py @@ -32,7 +32,7 @@ import shutil # pylint has an issue with distutils and virtualenvs: https://github.com/PyCQA/pylint/issues/73 import distutils.dir_util # pylint: disable=no-name-in-module, import-error from functools import partial -from billiard import RLock +from multiprocessing import RLock import jsonpickle http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b1b1a554/aria/workflows/api/task_graph.py -- diff --git a/aria/workflows/api/task_graph.py b/aria/workflows/api/task_graph.py index 20b0a50..3d75c10 100644 --- a/aria/workflows/api/task_graph.py +++ b/aria/workflows/api/task_graph.py @@ -276,6 +276,11 @@ class TaskGraph(object): @_filter_out_empty_tasks def sequence(self, *tasks): +""" +Create and insert a sequence into the graph, effect
incubator-ariatosca git commit: tests fix [Forced Update!]
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-3-api-for-creating-workflows 71c950ec9 -> 16f76c611 (forced update) tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/16f76c61 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/16f76c61 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/16f76c61 Branch: refs/heads/ARIA-3-api-for-creating-workflows Commit: 16f76c6110d0c7d20ee4067a2eddabab19e5fe67 Parents: 3d1c8b1 Author: mxmrlv Authored: Mon Oct 31 15:29:16 2016 +0200 Committer: mxmrlv Committed: Mon Oct 31 17:59:13 2016 +0200 -- aria/.pylintrc | 2 +- aria/storage/drivers.py| 2 +- aria/workflows/api/task_graph.py | 5 + aria/workflows/builtin/workflows.py| 17 ++--- aria/workflows/core/executor.py| 1 - tests/.pylintrc| 6 +++--- tests/test_logger.py | 2 +- tests/workflows/api/test_task_graph.py | 5 - tests/workflows/core/test_executor.py | 6 +++--- tox.ini| 4 ++-- 10 files changed, 30 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/16f76c61/aria/.pylintrc -- diff --git a/aria/.pylintrc b/aria/.pylintrc index eb188a0..ee27fdb 100644 --- a/aria/.pylintrc +++ b/aria/.pylintrc @@ -62,7 +62,7 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,redefined-builtin,logging-format-interpolation +disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,redefined-builtin,logging-format-interpolation,import-error [REPORTS] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/16f76c61/aria/storage/drivers.py -- diff --git a/aria/storage/drivers.py b/aria/storage/drivers.py index 33b7c00..0ad2f49 100644 --- a/aria/storage/drivers.py +++ b/aria/storage/drivers.py @@ -32,7 +32,7 @@ import shutil # pylint has an issue with distutils and virtualenvs: https://github.com/PyCQA/pylint/issues/73 import distutils.dir_util # pylint: disable=no-name-in-module, import-error from functools import partial -from billiard import RLock +from multiprocessing import RLock import jsonpickle http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/16f76c61/aria/workflows/api/task_graph.py -- diff --git a/aria/workflows/api/task_graph.py b/aria/workflows/api/task_graph.py index 20b0a50..3d75c10 100644 --- a/aria/workflows/api/task_graph.py +++ b/aria/workflows/api/task_graph.py @@ -276,6 +276,11 @@ class TaskGraph(object): @_filter_out_empty_tasks def sequence(self, *tasks): +""" +Create and insert a sequence into the graph, effective
incubator-ariatosca git commit: tests fix [Forced Update!]
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-3-api-for-creating-workflows d07560149 -> 71c950ec9 (forced update) tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/71c950ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/71c950ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/71c950ec Branch: refs/heads/ARIA-3-api-for-creating-workflows Commit: 71c950ec9a6a4fc05eac05d117099d9a3d429bed Parents: 3d1c8b1 Author: mxmrlv Authored: Mon Oct 31 15:29:16 2016 +0200 Committer: mxmrlv Committed: Mon Oct 31 15:47:25 2016 +0200 -- aria/storage/drivers.py | 2 +- aria/workflows/core/executor.py | 5 ++--- tests/test_logger.py | 2 +- tests/workflows/core/test_executor.py | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/71c950ec/aria/storage/drivers.py -- diff --git a/aria/storage/drivers.py b/aria/storage/drivers.py index 33b7c00..0ad2f49 100644 --- a/aria/storage/drivers.py +++ b/aria/storage/drivers.py @@ -32,7 +32,7 @@ import shutil # pylint has an issue with distutils and virtualenvs: https://github.com/PyCQA/pylint/issues/73 import distutils.dir_util # pylint: disable=no-name-in-module, import-error from functools import partial -from billiard import RLock +from multiprocessing import RLock import jsonpickle http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/71c950ec/aria/workflows/core/executor.py -- diff --git a/aria/workflows/core/executor.py b/aria/workflows/core/executor.py index 1abecac..0a5cd67 100644 --- a/aria/workflows/core/executor.py +++ b/aria/workflows/core/executor.py @@ -18,7 +18,7 @@ Executors for workflow tasks """ import threading -import billiard as multiprocessing +import multiprocessing import Queue import jsonpickle @@ -134,8 +134,7 @@ class MultiprocessExecutor(BaseExecutor): self._listener_thread = threading.Thread(target=self._listener) self._listener_thread.daemon = True self._listener_thread.start() -self._pool = multiprocessing.Pool(processes=pool_size, - maxtasksperchild=1) +self._pool = multiprocessing.Pool(processes=pool_size) def execute(self, task): self._tasks[task.id] = task http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/71c950ec/tests/test_logger.py -- diff --git a/tests/test_logger.py b/tests/test_logger.py index 7891dd6..37731bb 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -80,7 +80,7 @@ def test_create_file_log_handler(): assert handler.baseFilename == temp_file.name assert handler.maxBytes == 5 * 1000 * 1024 assert handler.backupCount == 10 -assert handler.delay is True +assert handler.stream is None assert handler.level == logging.DEBUG assert handler.formatter == _default_file_formatter http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/71c950ec/tests/workflows/core/test_executor.py -- diff --git a/tests/workflows/core/test_executor.py b/tests/workflows/core/test_executor.py index 27cb2ad..bfb19d1 100644 --- a/tests/workflows/core/test_executor.py +++ b/tests/workflows/core/test_executor.py @@ -50,7 +50,7 @@ class TestExecutor(object): assert task_with_inputs.states == ['start', 'failure'] assert isinstance(failing_task.exception, TestException) assert isinstance(task_with_inputs.exception, TestException) -assert task_with_inputs.exception.message == expected_value +assert str(task_with_inputs.exception) == expected_value assertion() def setup_method(self): @@ -62,7 +62,7 @@ class TestExecutor(object): events.start_task_signal.disconnect(start_handler) events.on_success_task_signal.disconnect(success_handler) events.on_failure_task_signal.disconnect(failure_handler) -if self.executor: +if hasattr(self, 'executor'): self.executor.close() @@ -97,7 +97,7 @@ class MockTask(object): self.exception = None self.id = str(uuid.uuid4()) name = func.__name__ -operation = 'tests.workflows.test_executor.{name}'.format(name=name) +operation = 'tests.workflows.core.test_executor.{name}'.format(na
incubator-ariatosca git commit: tests fix
Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-3-api-for-creating-workflows 3d1c8b121 -> d07560149 tests fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d0756014 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d0756014 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d0756014 Branch: refs/heads/ARIA-3-api-for-creating-workflows Commit: d07560149847ab25542d38ef7142735a0cba55ed Parents: 3d1c8b1 Author: mxmrlv Authored: Mon Oct 31 15:29:16 2016 +0200 Committer: mxmrlv Committed: Mon Oct 31 15:29:16 2016 +0200 -- aria/storage/drivers.py | 2 +- tests/test_logger.py | 2 +- tests/workflows/core/test_executor.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d0756014/aria/storage/drivers.py -- diff --git a/aria/storage/drivers.py b/aria/storage/drivers.py index 33b7c00..0ad2f49 100644 --- a/aria/storage/drivers.py +++ b/aria/storage/drivers.py @@ -32,7 +32,7 @@ import shutil # pylint has an issue with distutils and virtualenvs: https://github.com/PyCQA/pylint/issues/73 import distutils.dir_util # pylint: disable=no-name-in-module, import-error from functools import partial -from billiard import RLock +from multiprocessing import RLock import jsonpickle http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d0756014/tests/test_logger.py -- diff --git a/tests/test_logger.py b/tests/test_logger.py index 7891dd6..37731bb 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -80,7 +80,7 @@ def test_create_file_log_handler(): assert handler.baseFilename == temp_file.name assert handler.maxBytes == 5 * 1000 * 1024 assert handler.backupCount == 10 -assert handler.delay is True +assert handler.stream is None assert handler.level == logging.DEBUG assert handler.formatter == _default_file_formatter http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d0756014/tests/workflows/core/test_executor.py -- diff --git a/tests/workflows/core/test_executor.py b/tests/workflows/core/test_executor.py index 27cb2ad..bfb19d1 100644 --- a/tests/workflows/core/test_executor.py +++ b/tests/workflows/core/test_executor.py @@ -50,7 +50,7 @@ class TestExecutor(object): assert task_with_inputs.states == ['start', 'failure'] assert isinstance(failing_task.exception, TestException) assert isinstance(task_with_inputs.exception, TestException) -assert task_with_inputs.exception.message == expected_value +assert str(task_with_inputs.exception) == expected_value assertion() def setup_method(self): @@ -62,7 +62,7 @@ class TestExecutor(object): events.start_task_signal.disconnect(start_handler) events.on_success_task_signal.disconnect(success_handler) events.on_failure_task_signal.disconnect(failure_handler) -if self.executor: +if hasattr(self, 'executor'): self.executor.close() @@ -97,7 +97,7 @@ class MockTask(object): self.exception = None self.id = str(uuid.uuid4()) name = func.__name__ -operation = 'tests.workflows.test_executor.{name}'.format(name=name) +operation = 'tests.workflows.core.test_executor.{name}'.format(name=name) self.context = MockContext(operation_details={'operation': operation}, inputs=inputs or {}) self.logger = logging.getLogger()