diff --git a/internal/util/src/test/java/one/jpro/platform/internal/util/CommandRunnerTests.java b/internal/util/src/test/java/one/jpro/platform/internal/util/CommandRunnerTests.java index a41cf79f..b39e931c 100644 --- a/internal/util/src/test/java/one/jpro/platform/internal/util/CommandRunnerTests.java +++ b/internal/util/src/test/java/one/jpro/platform/internal/util/CommandRunnerTests.java @@ -8,6 +8,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.concurrent.TimeUnit; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -88,6 +89,7 @@ public void runAsyncWithOutput() throws IOException, InterruptedException { Process process = commandRunner.runAsync("async-dir-list"); int result = process.waitFor(); assertThat(result).isEqualTo(0); // Successful execution + Thread.sleep(TimeUnit.SECONDS.toMillis(3)); // Wait for the process output to be captured assertThat(commandRunner.getResponses().size()).isEqualTo(1); assertThat(commandRunner.getLastResponse()).isEqualTo("build.gradle"); }