Skip to content

Commit ce746f1

Browse files
committed
DockerComposeEnv: increase default ready-test limit and fix off by one
1 parent 36fdff2 commit ce746f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clients/src/test/java/no/nav/kafka/sandbox/DockerComposeEnv.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ private DockerComposeEnv up() throws Exception {
281281
List<CompletableFuture<Void>> allReadyTestsComplete = readyTests.stream().map(
282282
test -> CompletableFuture.runAsync(()-> {
283283
int count = 0;
284-
while (!test.get() && count++ < 100) {
284+
while (!test.get() && count++ < 300) {
285285
try {
286286
Thread.sleep(1000);
287287
} catch (InterruptedException ie) {
288288
throw new RuntimeException("Interrupted while waiting for ready-test");
289289
}
290290
}
291-
if (count > 100) {
292-
throw new RuntimeException("Ready-test failed");
291+
if (count >= 300) {
292+
throw new RuntimeException("Ready-test give up after 300 attempts");
293293
}
294294
}
295295
)).collect(Collectors.toList());

0 commit comments

Comments
 (0)