Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically [created] 0c3c2df2c
Operation toolbelt unit tests fail spordically Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0c3c2df2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0c3c2df2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0c3c2df2 Branch: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically Commit: 0c3c2df2cf23ff2dd44e43db663ac1b9249fc3e9 Parents: 0878526 Author: max-orlov <ma...@gigaspaces.com> Authored: Wed May 3 12:42:27 2017 +0300 Committer: max-orlov <ma...@gigaspaces.com> Committed: Wed May 3 12:42:27 2017 +0300 ---------------------------------------------------------------------- tests/orchestrator/context/test_operation.py | 6 ++++-- tests/orchestrator/context/test_toolbelt.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0c3c2df2/tests/orchestrator/context/test_operation.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/context/test_operation.py b/tests/orchestrator/context/test_operation.py index c399474..e65b524 100644 --- a/tests/orchestrator/context/test_operation.py +++ b/tests/orchestrator/context/test_operation.py @@ -15,6 +15,7 @@ import os import time +from threading import local import pytest @@ -34,8 +35,9 @@ from . import ( execute, ) -global_test_holder = {} - +_thread_local = local() +_thread_local.holder = {} +global_test_holder = _thread_local.holder @pytest.fixture def ctx(tmpdir): http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0c3c2df2/tests/orchestrator/context/test_toolbelt.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/context/test_toolbelt.py b/tests/orchestrator/context/test_toolbelt.py index 213d964..2ada6dd 100644 --- a/tests/orchestrator/context/test_toolbelt.py +++ b/tests/orchestrator/context/test_toolbelt.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from threading import local + import pytest from aria import workflow, operation @@ -27,7 +29,9 @@ from . import ( execute, ) -global_test_holder = {} +_thread_local = local() +_thread_local.holder = {} +global_test_holder = _thread_local.holder @pytest.fixture