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/f3b1a2e4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f3b1a2e4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f3b1a2e4 Branch: refs/heads/ARIA-160-Operation-toolbelt-unit-tests-fail-spordically Commit: f3b1a2e46c1468c27cd7570fd5b0d640b4a38d64 Parents: 8ca3ff2 Author: max-orlov <[email protected]> Authored: Wed May 3 12:42:27 2017 +0300 Committer: max-orlov <[email protected]> Committed: Thu May 4 18:26:43 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/f3b1a2e4/tests/orchestrator/context/test_operation.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/context/test_operation.py b/tests/orchestrator/context/test_operation.py index 971e0db..b78ecff 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/f3b1a2e4/tests/orchestrator/context/test_toolbelt.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/context/test_toolbelt.py b/tests/orchestrator/context/test_toolbelt.py index ecc3ac2..5b05f04 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
