Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/172#discussion_r125185909
  
    --- Diff: tests/orchestrator/workflows/executor/test_process_executor.py ---
    @@ -78,33 +80,52 @@ def test_closed(self, executor, model):
                 executor.execute(MockContext(model, 
task_kwargs=dict(function='some.function')))
             assert 'closed' in exc_info.value.message
     
    -    @pytest.mark.skipif(os.name == 'nt', reason='uses bash script')
    -    def test_process_termination(self, executor, model, fs_test_holder):
    -        argument = models.Argument.wrap('holder_path', 
fs_test_holder._path)
    -        model.argument.put(argument)
    +    def test_process_termination(self, executor, model, fs_test_holder, 
tmpdir):
    +        freeze_script_path = str(tmpdir.join('freeze_script'))
    +        with open(freeze_script_path, 'w+b') as f:
    +            f.write(
    +                '''import time
    +while True:
    +    time.sleep(5)
    +                '''
    +            )
    +        holder_path_argument = models.Argument.wrap('holder_path', 
fs_test_holder._path)
    +        script_path_argument = models.Argument.wrap('freezing_script_path',
    +                                                    
str(tmpdir.join('freeze_script')))
    +
    +        model.argument.put(holder_path_argument)
    +        model.argument.put(script_path_argument)
             ctx = MockContext(
                 model,
                 task_kwargs=dict(
                     function='{0}.{1}'.format(__name__, 
freezing_task.__name__),
    -                arguments=dict(holder_path=argument)),
    +                arguments=dict(holder_path=holder_path_argument,
    +                               freezing_script_path=script_path_argument)),
             )
     
             executor.execute(ctx)
     
    -        @retrying.retry(retry_on_result=lambda r: r is False, 
stop_max_delay=60000, wait_fixed=500)
    +        @retrying.retry(retry_on_result=lambda r: r is False)
    --- End diff --
    
    revert


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to