Ran Ziv created ARIA-315:
----------------------------
Summary: ProcessExecutor concurrent modifications test error
Key: ARIA-315
URL: https://issues.apache.org/jira/browse/ARIA-315
Project: AriaTosca
Issue Type: Bug
Reporter: Ran Ziv
Priority: Minor
The {{test_process_executor_concurrent_modifications}} module includes a test
which fails sporadically. See stack trace below:
{code}
________________ test_concurrent_modification_on_task_succeeded ________________
context = WorkflowContext(deployment_id=1, workflow_name=test_workflow,
execution_id=1)
executor = <aria.orchestrator.workflows.executor.process.ProcessExecutor object
at 0x7fc3cc88a550>
lock_files =
('/tmp/pytest-of-travis/pytest-0/test_concurrent_modification_o0/first_lock_file',
'/tmp/pytest-of-travis/pytest-0/test_concurrent_modification_o0/second_lock_file')
dataholder = <tests.helpers.FilesystemDataHolder object at 0x7fc3cc830190>
def test_concurrent_modification_on_task_succeeded(context, executor,
lock_files, dataholder):
> _test(context, executor, lock_files, _test_task_succeeded, dataholder,
> expected_failure=False)
tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
context = WorkflowContext(deployment_id=1, workflow_name=test_workflow,
execution_id=1)
executor = <aria.orchestrator.workflows.executor.process.ProcessExecutor object
at 0x7fc3cc88a550>
lock_files =
('/tmp/pytest-of-travis/pytest-0/test_concurrent_modification_o0/first_lock_file',
'/tmp/pytest-of-travis/pytest-0/test_concurrent_modification_o0/second_lock_file')
func = <function _test_task_succeeded at 0x7fc3fa8597d0>
dataholder = <tests.helpers.FilesystemDataHolder object at 0x7fc3cc830190>
expected_failure = False
def _test(context, executor, lock_files, func, dataholder,
expected_failure):
def _node(ctx):
return ctx.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
interface_name, operation_name =
mock.operations.NODE_OPERATIONS_INSTALL[0]
key = 'key'
first_value = 'value1'
second_value = 'value2'
arguments = {
'lock_files': lock_files,
'key': key,
'first_value': first_value,
'second_value': second_value,
'holder_path': dataholder.path
}
node = _node(context)
interface = mock.models.create_interface(
node.service,
interface_name,
operation_name,
operation_kwargs=dict(function='{0}.{1}'.format(__name__,
func.__name__),
arguments=arguments)
)
node.interfaces[interface.name] = interface
context.model.node.update(node)
@workflow
def mock_workflow(graph, **_):
graph.add_tasks(
api.task.OperationTask(
node,
interface_name=interface_name,
operation_name=operation_name,
arguments=arguments),
api.task.OperationTask(
node,
interface_name=interface_name,
operation_name=operation_name,
arguments=arguments)
)
signal = events.on_failure_task_signal
with events_collector(signal) as collected:
try:
execute_workflow(mock_workflow, context, executor)
except ExecutorException:
pass
props = _node(context).attributes
> assert dataholder['invocations'] == 2
E assert 1 == 2
tests/orchestrator/workflows/executor/test_process_executor_concurrent_modifications.py:112:
AssertionError
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)