mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(tests): concurrency test restarted
This commit is contained in:
@@ -178,7 +178,10 @@ public class FlowConcurrencyCaseTest {
|
|||||||
// we restart the first one, it should be queued then fail again.
|
// 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 failedExecution = runnerUtils.awaitExecution(e -> e.getState().getCurrent().equals(Type.FAILED), execution1);
|
||||||
Execution restarted = executionService.restart(failedExecution, null);
|
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);
|
Execution executionResult2 = runnerUtils.awaitExecution(e -> e.getState().getCurrent().equals(Type.FAILED), execution2);
|
||||||
|
|
||||||
assertThat(executionResult1.getState().getCurrent()).isEqualTo(Type.FAILED);
|
assertThat(executionResult1.getState().getCurrent()).isEqualTo(Type.FAILED);
|
||||||
|
|||||||
Reference in New Issue
Block a user