diff --git a/e2e/src/test/java/io/aiven/kafka/tieredstorage/e2e/SingleBrokerTest.java b/e2e/src/test/java/io/aiven/kafka/tieredstorage/e2e/SingleBrokerTest.java index 69d85d074..8a015eac2 100644 --- a/e2e/src/test/java/io/aiven/kafka/tieredstorage/e2e/SingleBrokerTest.java +++ b/e2e/src/test/java/io/aiven/kafka/tieredstorage/e2e/SingleBrokerTest.java @@ -69,6 +69,7 @@ import org.slf4j.LoggerFactory; import org.testcontainers.containers.KafkaContainer; import org.testcontainers.containers.Network; +import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.utility.DockerImageName; @@ -162,6 +163,7 @@ static void setupKafka(final Consumer tsPluginSetup) throws Exce .withCreateContainerCmdModifier( cmd -> cmd.getHostConfig().withUlimits(List.of(new Ulimit("nofile", 30_000L, 30_000L)))) .withFileSystemBind(localDataDir.toString(), KAFKA_DATA_DIR_CONTAINER) + .withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger("kafka"))) .withNetwork(NETWORK); tsPluginSetup.accept(kafka); @@ -182,11 +184,6 @@ static void stopKafka() { adminClient.close(); } - if (FailFastExtension.failed) { - LOG.info("Kafka container logs:"); - LOG.info(kafka.getLogs()); - } - kafka.stop(); }