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

[ST] Update test-clients to 0.10.0 after the release #11090

Merged
merged 4 commits into from
Feb 4, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ public class Environment {
private static final String RESOURCE_ALLOCATION_STRATEGY_DEFAULT = "SHARE_MEMORY_FOR_ALL_COMPONENTS";

private static final String ST_KAFKA_VERSION_DEFAULT = TestKafkaVersion.getDefaultSupportedKafkaVersion();
private static final String ST_CLIENTS_KAFKA_VERSION_DEFAULT = "3.8.0";
public static final String TEST_CLIENTS_VERSION_DEFAULT = "0.9.1";
private static final String ST_CLIENTS_KAFKA_VERSION_DEFAULT = "3.9.0";
public static final String TEST_CLIENTS_VERSION_DEFAULT = "0.10.0";
public static final String ST_FILE_PLUGIN_URL_DEFAULT = "https://repo1.maven.org/maven2/org/apache/kafka/connect-file/" + ST_KAFKA_VERSION_DEFAULT + "/connect-file-" + ST_KAFKA_VERSION_DEFAULT + ".jar";

public static final String IP_FAMILY_DEFAULT = "ipv4";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class KafkaClients extends BaseClients {
private String caCertSecretName;
private String headers;
private PodSecurityProfile podSecurityPolicy;
private String messagesPerTransaction;

public String getProducerName() {
return producerName;
Expand Down Expand Up @@ -138,6 +139,14 @@ public void setPodSecurityPolicy(final PodSecurityProfile podSecurityPolicy) {
this.podSecurityPolicy = podSecurityPolicy;
}

public void setMessagesPerTransaction(String messagesPerTransaction) {
this.messagesPerTransaction = messagesPerTransaction;
}

public String getMessagesPerTransaction() {
return messagesPerTransaction;
}

public Job producerStrimzi() {
return defaultProducerStrimzi().build();
}
Expand Down Expand Up @@ -278,6 +287,22 @@ public JobBuilder defaultProducerStrimzi() {
.endSpec();
}

if (this.getMessagesPerTransaction() != null) {
builder
.editSpec()
.editTemplate()
.editSpec()
.editFirstContainer()
.addNewEnv()
.withName("MESSAGES_PER_TRANSACTION")
.withValue(this.getMessagesPerTransaction())
.endEnv()
.endContainer()
.endSpec()
.endTemplate()
.endSpec();
}

if (PodSecurityProfile.RESTRICTED == this.podSecurityPolicy) {
this.enableRestrictedProfile(builder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ void testManualTriggeringRollingUpdate() {
final KafkaClients continuousClients = ClientUtils.getContinuousPlainClientBuilder(testStorage)
.withMessageCount(continuousClientsMessageCount)
.withAdditionalConfig(producerAdditionConfiguration)
// TODO: needed because of bug in test-clients - https://github.com/strimzi/test-clients/issues/119
.withMessagesPerTransaction("1")
.build();

resourceManager.createResourceWithWait(continuousClients.producerStrimzi(), continuousClients.consumerStrimzi());
Expand Down Expand Up @@ -362,6 +364,8 @@ void testAddingAndRemovingJbodVolumes() {
KafkaClients kafkaBasicClientJob = ClientUtils.getContinuousPlainClientBuilder(testStorage)
.withMessageCount(continuousClientsMessageCount)
.withAdditionalConfig(producerAdditionConfiguration)
// TODO: needed because of bug in test-clients - https://github.com/strimzi/test-clients/issues/119
.withMessagesPerTransaction("1")
.build();

resourceManager.createResourceWithWait(kafkaBasicClientJob.producerStrimzi(), kafkaBasicClientJob.consumerStrimzi());
Expand Down Expand Up @@ -503,6 +507,8 @@ void testJbodMetadataLogRelocation() {
KafkaClients kafkaBasicClientJob = ClientUtils.getContinuousPlainClientBuilder(testStorage)
.withMessageCount(continuousClientsMessageCount)
.withAdditionalConfig(producerAdditionConfiguration)
// TODO: needed because of bug in test-clients - https://github.com/strimzi/test-clients/issues/119
.withMessagesPerTransaction("1")
.build();

resourceManager.createResourceWithWait(kafkaBasicClientJob.producerStrimzi(), kafkaBasicClientJob.consumerStrimzi());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,7 @@ void testKafkaRackAwareness() {
Pod pod = kubeClient().getPod(testStorage.getNamespaceName(), podName);

resourceManager.createResourceWithWait(
AdminClientTemplates.plainAdminClient(testStorage.getNamespaceName(), testStorage.getAdminName(), KafkaResources.plainBootstrapAddress(testStorage.getClusterName()))
.editSpec()
.editTemplate()
.editSpec()
.editFirstContainer()
// TODO: once new test-clients are released (0.10.0), this should be removed
.withImage("quay.io/strimzi-test-clients/test-clients:latest-kafka-" + Environment.ST_KAFKA_VERSION)
.endContainer()
.endSpec()
.endTemplate()
.endSpec()
.build()
AdminClientTemplates.plainAdminClient(testStorage.getNamespaceName(), testStorage.getAdminName(), KafkaResources.plainBootstrapAddress(testStorage.getClusterName())).build()
);
final AdminClient adminClient = AdminClientUtils.getConfiguredAdminClient(testStorage.getNamespaceName(), testStorage.getAdminName());

Expand Down
Loading