From 7f8bccd1324f613e405d4ce8d46f201515bede4d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 27 Feb 2024 11:54:49 +0100 Subject: [PATCH] WIP:test: HandoverIT-POC - splitted up code into smaller classes -- ALIGN --- .../de/juplo/kafka/chat/backend/AbstractHandoverIT.java | 6 +++--- .../kafka/chat/backend/AbstractHandoverITContainers.java | 4 ++-- ...ntainers.java => KafkaAbstractHandoverITContainers.java} | 4 ++-- .../java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/test/java/de/juplo/kafka/chat/backend/{KafkaHandoverITContainers.java => KafkaAbstractHandoverITContainers.java} (95%) diff --git a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java index af5c9583..dfbef4d4 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java @@ -21,15 +21,15 @@ import java.util.stream.IntStream; @Testcontainers @Slf4j -public abstract class HandoverIT +public abstract class AbstractHandoverIT { static final ParameterizedTypeReference> SSE_TYPE = new ParameterizedTypeReference<>() {}; - private final HandoverITContainers containers; + private final AbstractHandoverITContainers containers; - HandoverIT(HandoverITContainers containers) + AbstractHandoverIT(AbstractHandoverITContainers containers) { this.containers = containers; } diff --git a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverITContainers.java b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverITContainers.java index 876d117c..d34d5541 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverITContainers.java +++ b/src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverITContainers.java @@ -18,7 +18,7 @@ import java.util.Arrays; @Slf4j -public abstract class HandoverITContainers +public abstract class AbstractHandoverITContainers { static final ImagePullPolicy NEVER_PULL = imageName -> false; @@ -27,7 +27,7 @@ public abstract class HandoverITContainers final GenericContainer haproxy, backend1, backend2, backend3; - HandoverITContainers() + AbstractHandoverITContainers() { haproxy = createHaproxyContainer(); backend1 = createBackendContainer("1"); diff --git a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverITContainers.java b/src/test/java/de/juplo/kafka/chat/backend/KafkaAbstractHandoverITContainers.java similarity index 95% rename from src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverITContainers.java rename to src/test/java/de/juplo/kafka/chat/backend/KafkaAbstractHandoverITContainers.java index 27eb044d..0b4553b4 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverITContainers.java +++ b/src/test/java/de/juplo/kafka/chat/backend/KafkaAbstractHandoverITContainers.java @@ -11,12 +11,12 @@ import java.io.IOException; @Slf4j -class KafkaHandoverITContainers extends HandoverITContainers +class KafkaAbstractHandoverITContainers extends AbstractHandoverITContainers { private final KafkaContainer kafka; - KafkaHandoverITContainers() + KafkaAbstractHandoverITContainers() { kafka = createKafkaContainer(); } diff --git a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java b/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java index eaa24094..53315f18 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/KafkaHandoverIT.java @@ -4,10 +4,10 @@ import lombok.extern.slf4j.Slf4j; @Slf4j -class KafkaHandoverIT extends HandoverIT +class KafkaHandoverIT extends AbstractHandoverIT { KafkaHandoverIT() { - super(new KafkaHandoverITContainers()); + super(new KafkaAbstractHandoverITContainers()); } } -- 2.20.1