diff --git a/kroxylicious-systemtests/src/main/java/io/kroxylicious/systemtests/installation/kroxylicious/KroxyliciousApp.java b/kroxylicious-systemtests/src/main/java/io/kroxylicious/systemtests/installation/kroxylicious/KroxyliciousApp.java index 571f3af64..187e829eb 100644 --- a/kroxylicious-systemtests/src/main/java/io/kroxylicious/systemtests/installation/kroxylicious/KroxyliciousApp.java +++ b/kroxylicious-systemtests/src/main/java/io/kroxylicious/systemtests/installation/kroxylicious/KroxyliciousApp.java @@ -14,6 +14,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Iterator; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Stream; @@ -22,7 +23,8 @@ import io.kroxylicious.systemtests.executor.Exec; import io.kroxylicious.systemtests.templates.kroxylicious.KroxyConfigTemplates; -import io.kroxylicious.systemtests.utils.TestUtils; + +import static org.testcontainers.shaded.org.awaitility.Awaitility.await; /** * The type Kroxylicious app. @@ -57,8 +59,8 @@ public void run() { } }); file = File.createTempFile("config", ".yaml"); - file.deleteOnExit(); Files.writeString(file.toPath(), KroxyConfigTemplates.getDefaultExternalKroxyConfigMap(clusterIp)); + file.deleteOnExit(); } catch (IOException e) { throw new RuntimeException(e); @@ -108,7 +110,7 @@ public String getBootstrap() { */ public boolean isRunning() { if (thread.isAlive()) { - TestUtils.waitFor("Waiting for process being launched", 500, 3000, () -> ProcessHandle.of(pid).isPresent()); + await().atMost(3, TimeUnit.SECONDS).until(() -> ProcessHandle.of(pid).isPresent()); } return thread.isAlive() && ProcessHandle.of(pid).isPresent(); }