diff --git a/pom.xml b/pom.xml index 76743e0..7e6afc9 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 5.14.2 2.0.16 1.5.3 - 1.20.2 + 1.20.3 UTF-8 diff --git a/src/test/java/software/amazon/event/kafkaconnector/AbstractEventBridgeSinkConnectorIT.java b/src/test/java/software/amazon/event/kafkaconnector/AbstractEventBridgeSinkConnectorIT.java index 493106b..17c547b 100644 --- a/src/test/java/software/amazon/event/kafkaconnector/AbstractEventBridgeSinkConnectorIT.java +++ b/src/test/java/software/amazon/event/kafkaconnector/AbstractEventBridgeSinkConnectorIT.java @@ -31,6 +31,7 @@ import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.StringSerializer; import org.apache.kafka.connect.json.JsonSerializer; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.slf4j.Logger; @@ -38,7 +39,6 @@ import org.testcontainers.containers.DockerComposeContainer; import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.wait.strategy.Wait; -import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; @@ -84,8 +84,7 @@ public abstract class AbstractEventBridgeSinkConnectorIT { protected static final Logger log = LoggerFactory.getLogger(AbstractEventBridgeSinkConnectorIT.class); - @Container - private static final DockerComposeContainer environment = + private final DockerComposeContainer environment = new DockerComposeContainer<>("e2e", getComposeFile()) .withLogConsumer("connect", new Slf4jLogConsumer(log).withSeparateOutputStreams()) .withEnv("AWS_ACCESS_KEY_ID", AWS_ACCESS_KEY_ID) @@ -120,6 +119,16 @@ public abstract class AbstractEventBridgeSinkConnectorIT { new JsonSerializer()); @BeforeAll + public void setup() { + environment.start(); + createAwsResources(); + } + + @AfterAll + public void tearDown() { + environment.stop(); + } + public void createAwsResources() { log.info("creating aws localstack resources"); var credentials =