import reactor.core.publisher.Mono;
import java.io.IOException;
+import java.time.Duration;
import java.util.stream.IntStream;
Thread.sleep(10000);
receiveMessage(chatRoom).subscribe(message -> log.info("message: {}", message));
+
+ Thread.sleep(1000000);
}
Mono<ChatRoomInfoTo> createChatRoom(String name)
Awaitility
.await()
- .until(() -> webClient
+ .atMost(Duration.ofMinutes(10))
+ .until(() -> WebClient
+ .create("http://localhost:" + BACKEND_1.getMappedPort(8080))
.get()
.uri("/actuator/health")
.exchangeToMono(response ->
}
})
.block());
-
- log.info("Some backend was UP");
}
WebClient webClient;
"--chat.backend.kafka.haproxy-runtime-api=haproxy:8401",
"--chat.backend.kafka.haproxy-map=/usr/local/etc/haproxy/sharding.map"
)
+ .withExposedPorts(8080)
.dependsOn(KAFKA)
.waitingFor(Wait.forLogMessage(".*Started\\ ChatBackendApplication.*\\n", 1))
.withLogConsumer(new Slf4jLogConsumer(log, true).withPrefix("BACKEND-1"));
"--chat.backend.kafka.haproxy-runtime-api=haproxy:8401",
"--chat.backend.kafka.haproxy-map=/usr/local/etc/haproxy/sharding.map"
)
+ .withExposedPorts(8080)
.dependsOn(KAFKA)
.waitingFor(Wait.forLogMessage(".*Started\\ ChatBackendApplication.*\\n", 1))
.withLogConsumer(new Slf4jLogConsumer(log, true).withPrefix("BACKEND-2"));
"--chat.backend.kafka.haproxy-runtime-api=haproxy:8401",
"--chat.backend.kafka.haproxy-map=/usr/local/etc/haproxy/sharding.map"
)
+ .withExposedPorts(8080)
.dependsOn(KAFKA)
.waitingFor(Wait.forLogMessage(".*Started\\ ChatBackendApplication.*\\n", 1))
.withLogConsumer(new Slf4jLogConsumer(log, true).withPrefix("BACKEND-3"));