Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Use kafka-native container image for Kafka ITs #494

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<!-- Tests -->
<junit.version>5.10.0</junit.version>
<junit-bom.version>5.10.2</junit-bom.version>
<testcontainer.version>1.19.8</testcontainer.version>
<testcontainer.version>1.20.2</testcontainer.version>
<!-- Dependencies -->
<kafka.version>3.7.0</kafka.version>
<picocli.version>4.7.6</picocli.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import org.junit.jupiter.api.TestMethodOrder;
import org.slf4j.Logger;
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.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@Testcontainers
Expand All @@ -35,14 +35,13 @@ public class AbstractKafkaIntegrationTest {
private static final Logger LOG = LoggerFactory.getLogger(AbstractKafkaIntegrationTest.class);
private static final Network KAFKA_NETWORK = Network.newNetwork();

public static final String CONFLUENT_PLATFORM_VERSION = "7.4.0";
public static final String APACHE_KAFKA_VERSION = "3.8.0";
public static final int DEFAULT_NUM_PARTITIONS = 1;
public static final short DEFAULT_REPLICATION_FACTOR = (short) 1;

@Container
final KafkaContainer kafka = new KafkaContainer(
DockerImageName.parse("confluentinc/cp-kafka").withTag(CONFLUENT_PLATFORM_VERSION))
.withKraft()
DockerImageName.parse("apache/kafka-native").withTag(APACHE_KAFKA_VERSION))
.withNetwork(KAFKA_NETWORK)
.withEnv("KAFKA_TRANSACTION_STATE_LOG_MIN_ISR", "1")
.withEnv("KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR", "1")
Expand Down
Loading