From a6cf2015ffb39880aa08afc80af4fd5fadc9843a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Tue, 16 Dec 2025 12:11:34 +0100 Subject: [PATCH] fix(tests): concurrency test restarted --- .../java/io/kestra/core/runners/FlowConcurrencyCaseTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/io/kestra/core/runners/FlowConcurrencyCaseTest.java b/core/src/test/java/io/kestra/core/runners/FlowConcurrencyCaseTest.java index 94dc66bac8..e7afd62f57 100644 --- a/core/src/test/java/io/kestra/core/runners/FlowConcurrencyCaseTest.java +++ b/core/src/test/java/io/kestra/core/runners/FlowConcurrencyCaseTest.java @@ -178,7 +178,10 @@ public class FlowConcurrencyCaseTest { // we restart the first one, it should be queued then fail again. Execution failedExecution = runnerUtils.awaitExecution(e -> e.getState().getCurrent().equals(Type.FAILED), execution1); Execution restarted = executionService.restart(failedExecution, null); - Execution executionResult1 = runnerUtils.restartExecution(e -> e.getState().getCurrent().equals(Type.FAILED), restarted); + Execution executionResult1 = runnerUtils.restartExecution( + e -> e.getState().getHistories().stream().anyMatch(history -> history.getState() == Type.RESTARTED) && e.getState().getCurrent().equals(Type.FAILED), + restarted + ); Execution executionResult2 = runnerUtils.awaitExecution(e -> e.getState().getCurrent().equals(Type.FAILED), execution2); assertThat(executionResult1.getState().getCurrent()).isEqualTo(Type.FAILED);