Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-237-Support-for-resuming-failed-workflow-executions 53dc64e4c -> 712a26e1b
close processes test for appveyor 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/712a26e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/712a26e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/712a26e1 Branch: refs/heads/ARIA-237-Support-for-resuming-failed-workflow-executions Commit: 712a26e1b5b99318390e122b4c10535bce75982e Parents: 53dc64e Author: max-orlov <[email protected]> Authored: Thu Jun 29 10:55:54 2017 +0300 Committer: max-orlov <[email protected]> Committed: Thu Jun 29 10:55:54 2017 +0300 ---------------------------------------------------------------------- .../workflows/executor/test_process_executor.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/712a26e1/tests/orchestrator/workflows/executor/test_process_executor.py ---------------------------------------------------------------------- diff --git a/tests/orchestrator/workflows/executor/test_process_executor.py b/tests/orchestrator/workflows/executor/test_process_executor.py index 6cac288..3c8133f 100644 --- a/tests/orchestrator/workflows/executor/test_process_executor.py +++ b/tests/orchestrator/workflows/executor/test_process_executor.py @@ -39,6 +39,9 @@ from tests.fixtures import ( # pylint: disable=unused-import from . import MockContext +IS_WINDOWS = os.name == 'nt' + + class TestProcessExecutor(object): def test_plugin_execution(self, executor, mock_plugin, model): @@ -139,6 +142,18 @@ def model(tmpdir): @operation def freezing_task(holder_path, **_): holder = FilesystemDataHolder(holder_path) - holder['subproc'] = subprocess.Popen('while true; do sleep 5; done', shell=True).pid + if IS_WINDOWS: + command = ''' + :loop + timeout 5 + goto loop + ''' + else: + command = ''' + while true + do sleep 5 + done + ''' + holder['subproc'] = subprocess.Popen(command, shell=True).pid while True: time.sleep(5)
