Github user aviyoop commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/208#discussion_r152280899
--- Diff: tests/orchestrator/execution/test_execution_compiler.py ---
@@ -296,171 +230,161 @@ def _setup_mock_workflow_in_service(request,
inputs=None):
return mock_workflow_name
-def _create_workflow_runner(request, workflow_name, inputs=None,
executor=None,
- task_max_attempts=None,
task_retry_interval=None):
+def _get_compiler(request, workflow_name):
# helper method for instantiating a workflow runner
- service_id = request.getfixturevalue('service').id
+ service = request.getfixturevalue('service')
model = request.getfixturevalue('model')
resource = request.getfixturevalue('resource')
plugin_manager = request.getfixturevalue('plugin_manager')
- # task configuration parameters can't be set to None, therefore only
- # passing those if they've been set by the test
- task_configuration_kwargs = dict()
- if task_max_attempts is not None:
- task_configuration_kwargs['task_max_attempts'] = task_max_attempts
- if task_retry_interval is not None:
- task_configuration_kwargs['task_retry_interval'] =
task_retry_interval
-
- return WorkflowRunner(
- workflow_name=workflow_name,
- service_id=service_id,
- inputs=inputs or {},
- executor=executor,
- model_storage=model,
- resource_storage=resource,
- plugin_manager=plugin_manager,
- **task_configuration_kwargs)
+ return execution_compiler.ExecutionCompiler(
+ model,
+ resource,
+ plugin_manager,
+ service,
+ workflow_name
+ )
class TestResumableWorkflows(object):
- def _create_initial_workflow_runner(
- self, workflow_context, workflow, executor, inputs=None):
+ def _compile_execution(
--- End diff --
prepare_execution_(and_prepare_workflow_ctx)? Yes, that makes sense...
---