package de.juplo.kafka.chat.backend;
import de.juplo.kafka.chat.backend.api.ChatRoomInfoTo;
-import de.juplo.kafka.chat.backend.api.MessageTo;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.testcontainers.junit.jupiter.Testcontainers;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-import reactor.util.retry.Retry;
-
-import java.time.Duration;
-import java.util.stream.IntStream;
@Testcontainers
static final ParameterizedTypeReference<ServerSentEvent<String>> SSE_TYPE = new ParameterizedTypeReference<>() {};
- private final AbstractContainerTemplates containerTemplates;
+ private final HandoverITContainers containers;
- AbstractHandoverIT(AbstractContainerTemplates containerTemplates)
+ AbstractHandoverIT(HandoverITContainers containers)
{
- this.containerTemplates = containerTemplates;
+ this.containers = containers;
}
@BeforeEach
void setUp() throws Exception
{
- containerTemplates.setUp();
+ containers.setUp();
- Integer port = containerTemplates.haproxy.getMappedPort(8400);
+ Integer port = containers.haproxy.getMappedPort(8400);
webClient = WebClient.create("http://localhost:" + port);
}
}
@Slf4j
-public abstract class AbstractContainerTemplates
+public abstract class HandoverITContainers
{
static final ImagePullPolicy NEVER_PULL = imageName -> false;
final GenericContainer haproxy, backend1, backend2, backend3;
- AbstractContainerTemplates()
+ HandoverITContainers()
{
haproxy = createHaproxyContainer();
backend1 = createBackendContainer("1");