Fix join test_triggered_by_error

The test test_triggered_by_error is failing with new eventlet release.
Here is why.
When a task fail, the worflow is set to error.
Beeing in error prevent any further task to be executed.

Because of uncontrolled behavior, this test was expecting that the join
task was triggered even if a previous task was in error.
This is not always true.

The fix is to make sure the join task is triggered on error by using
on-complete instead of on-sucess.

Change-Id: I9224d53a171dc7a9f46e51cc2c6f43d2ea7852c5
Signed-off-by: Arnaud M <arnaud.morin@gmail.com>
This commit is contained in:
Arnaud M 2025-01-02 22:01:10 +01:00
parent f9d990612d
commit 84d6baa481

View File

@ -1111,7 +1111,7 @@ class JoinEngineTest(base.EngineTestCase):
task2:
action: std.fail
on-success: join_task
on-complete: join_task
task3:
action: std.noop
@ -1125,11 +1125,11 @@ class JoinEngineTest(base.EngineTestCase):
wf_ex = self.engine.start_workflow('wf')
# Wait for wf to finish
self.await_workflow_error(wf_ex.id)
with db_api.transaction():
wf_ex = db_api.get_workflow_execution(wf_ex.id)
t_execs = wf_ex.task_executions
task1 = self._assert_single_item(
@ -1159,13 +1159,6 @@ class JoinEngineTest(base.EngineTestCase):
self.assertIsNone(task2.runtime_context.get(key))
self.assertIsNone(task3.runtime_context.get(key))
self.assertIn(
{
"task_id": task2.id,
"event": "not triggered"
},
join_task.runtime_context.get(key)
)
self.assertIn(
{
"task_id": task3.id,