use of io.strimzi.systemtest.utils.TestKafkaVersion in project strimzi by strimzi.
the class KafkaUpgradeDowngradeIsolatedST method testKafkaClusterDowngrade.
@IsolatedTest
void testKafkaClusterDowngrade(ExtensionContext testContext) {
List<TestKafkaVersion> sortedVersions = TestKafkaVersion.getSupportedKafkaVersions();
String clusterName = mapWithClusterNames.get(testContext.getDisplayName());
String producerName = clusterName + "-producer";
String consumerName = clusterName + "-consumer";
for (int x = sortedVersions.size() - 1; x > 0; x--) {
TestKafkaVersion initialVersion = sortedVersions.get(x);
TestKafkaVersion newVersion = sortedVersions.get(x - 1);
// If it is a downgrade then we make sure to use the lower version number for the message format
String logMsgFormat = newVersion.messageVersion();
String interBrokerProtocol = newVersion.protocolVersion();
runVersionChange(initialVersion, newVersion, producerName, consumerName, logMsgFormat, interBrokerProtocol, 3, 3, testContext);
}
// ##############################
// Validate that continuous clients finished successfully
// ##############################
ClientUtils.waitTillContinuousClientsFinish(producerName, consumerName, INFRA_NAMESPACE, continuousClientsMessageCount);
// ##############################
}
use of io.strimzi.systemtest.utils.TestKafkaVersion in project strimzi by strimzi.
the class KafkaUpgradeDowngradeIsolatedST method testKafkaClusterUpgrade.
@IsolatedTest
void testKafkaClusterUpgrade(ExtensionContext testContext) {
List<TestKafkaVersion> sortedVersions = TestKafkaVersion.getSupportedKafkaVersions();
String producerName = clusterName + "-producer";
String consumerName = clusterName + "-consumer";
for (int x = 0; x < sortedVersions.size() - 1; x++) {
TestKafkaVersion initialVersion = sortedVersions.get(x);
TestKafkaVersion newVersion = sortedVersions.get(x + 1);
// If it is an upgrade test we keep the message format as the lower version number
String logMsgFormat = initialVersion.messageVersion();
String interBrokerProtocol = initialVersion.protocolVersion();
runVersionChange(initialVersion, newVersion, producerName, consumerName, logMsgFormat, interBrokerProtocol, 3, 3, testContext);
}
// ##############################
// Validate that continuous clients finished successfully
// ##############################
ClientUtils.waitTillContinuousClientsFinish(producerName, consumerName, INFRA_NAMESPACE, continuousClientsMessageCount);
// ##############################
}
use of io.strimzi.systemtest.utils.TestKafkaVersion in project strimzi by strimzi.
the class KafkaUpgradeDowngradeIsolatedST method testKafkaClusterDowngradeToOlderMessageFormat.
@IsolatedTest
void testKafkaClusterDowngradeToOlderMessageFormat(ExtensionContext testContext) {
List<TestKafkaVersion> sortedVersions = TestKafkaVersion.getSupportedKafkaVersions();
String clusterName = mapWithClusterNames.get(testContext.getDisplayName());
String producerName = clusterName + "-producer";
String consumerName = clusterName + "-consumer";
String initLogMsgFormat = sortedVersions.get(0).messageVersion();
String initInterBrokerProtocol = sortedVersions.get(0).protocolVersion();
for (int x = sortedVersions.size() - 1; x > 0; x--) {
TestKafkaVersion initialVersion = sortedVersions.get(x);
TestKafkaVersion newVersion = sortedVersions.get(x - 1);
runVersionChange(initialVersion, newVersion, producerName, consumerName, initLogMsgFormat, initInterBrokerProtocol, 3, 3, testContext);
}
// ##############################
// Validate that continuous clients finished successfully
// ##############################
ClientUtils.waitTillContinuousClientsFinish(producerName, consumerName, INFRA_NAMESPACE, continuousClientsMessageCount);
// ##############################
}
use of io.strimzi.systemtest.utils.TestKafkaVersion in project strimzi-kafka-operator by strimzi.
the class KafkaUpgradeDowngradeIsolatedST method testKafkaClusterDowngrade.
@IsolatedTest
void testKafkaClusterDowngrade(ExtensionContext testContext) {
List<TestKafkaVersion> sortedVersions = TestKafkaVersion.getSupportedKafkaVersions();
String clusterName = mapWithClusterNames.get(testContext.getDisplayName());
String producerName = clusterName + "-producer";
String consumerName = clusterName + "-consumer";
for (int x = sortedVersions.size() - 1; x > 0; x--) {
TestKafkaVersion initialVersion = sortedVersions.get(x);
TestKafkaVersion newVersion = sortedVersions.get(x - 1);
// If it is a downgrade then we make sure to use the lower version number for the message format
String logMsgFormat = newVersion.messageVersion();
String interBrokerProtocol = newVersion.protocolVersion();
runVersionChange(initialVersion, newVersion, producerName, consumerName, logMsgFormat, interBrokerProtocol, 3, 3, testContext);
}
// ##############################
// Validate that continuous clients finished successfully
// ##############################
ClientUtils.waitTillContinuousClientsFinish(producerName, consumerName, INFRA_NAMESPACE, continuousClientsMessageCount);
// ##############################
}
use of io.strimzi.systemtest.utils.TestKafkaVersion in project strimzi-kafka-operator by strimzi.
the class KafkaUpgradeDowngradeIsolatedST method testKafkaClusterUpgrade.
@IsolatedTest
void testKafkaClusterUpgrade(ExtensionContext testContext) {
List<TestKafkaVersion> sortedVersions = TestKafkaVersion.getSupportedKafkaVersions();
String producerName = clusterName + "-producer";
String consumerName = clusterName + "-consumer";
for (int x = 0; x < sortedVersions.size() - 1; x++) {
TestKafkaVersion initialVersion = sortedVersions.get(x);
TestKafkaVersion newVersion = sortedVersions.get(x + 1);
// If it is an upgrade test we keep the message format as the lower version number
String logMsgFormat = initialVersion.messageVersion();
String interBrokerProtocol = initialVersion.protocolVersion();
runVersionChange(initialVersion, newVersion, producerName, consumerName, logMsgFormat, interBrokerProtocol, 3, 3, testContext);
}
// ##############################
// Validate that continuous clients finished successfully
// ##############################
ClientUtils.waitTillContinuousClientsFinish(producerName, consumerName, INFRA_NAMESPACE, continuousClientsMessageCount);
// ##############################
}
Aggregations