Skip to content

Commit

Permalink
[ST] enable most of formerly kraftNotEnabled tests (#10521)
Browse files Browse the repository at this point in the history
Signed-off-by: hzrncik <[email protected]>
  • Loading branch information
henryZrncik authored Aug 30, 2024
1 parent f3b8493 commit c749712
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import io.strimzi.systemtest.AbstractST;
import io.strimzi.systemtest.Environment;
import io.strimzi.systemtest.TestConstants;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.annotations.ParallelNamespaceTest;
import io.strimzi.systemtest.cli.KafkaCmdClient;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients;
Expand Down Expand Up @@ -711,7 +710,6 @@ void testStrimziIdentityReplicationPolicy() {
}

@ParallelNamespaceTest
@KRaftNotSupported("This the is failing with KRaft and need more investigation")
void testRestoreOffsetsInConsumerGroup() {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import io.strimzi.systemtest.Environment;
import io.strimzi.systemtest.TestConstants;
import io.strimzi.systemtest.annotations.IsolatedTest;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients;
import io.strimzi.systemtest.resources.NamespaceManager;
import io.strimzi.systemtest.resources.NodePoolsConverter;
Expand Down Expand Up @@ -253,7 +252,6 @@ void testMultipleCOsInDifferentNamespaces() {
*/
@IsolatedTest
@Tag(CRUISE_CONTROL)
@KRaftNotSupported("The scaling of the Kafka Pods is not working properly at the moment")
void testKafkaCCAndRebalanceWithMultipleCOs() {
assumeFalse(Environment.isNamespaceRbacScope());
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext(), DEFAULT_NAMESPACE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,25 @@ private void verifyStabilityBySendingAndReceivingMessages(TestStorage testStorag
}

@IsolatedTest
@KRaftNotSupported("Zookeeper is not supported by KRaft mode and is used in this test class")
void testRecoveryFromKafkaAndZookeeperPodDeletion() {
final String kafkaStrimziPodSet = StrimziPodSetResource.getBrokerComponentName(sharedClusterName);
final String zkName = KafkaResources.zookeeperComponentName(sharedClusterName);

final LabelSelector brokerSelector = KafkaResource.getLabelSelector(sharedClusterName, kafkaStrimziPodSet);
final LabelSelector controllerSelector = KafkaResource.getLabelSelector(sharedClusterName, zkName);

LOGGER.info("Deleting most of the Kafka and ZK Pods");
LOGGER.info("Deleting most of the Kafka pods");
List<Pod> kafkaPodList = kubeClient().listPods(brokerSelector);
List<Pod> zkPodList = kubeClient().listPods(controllerSelector);

kafkaPodList.subList(0, kafkaPodList.size() - 1).forEach(pod -> kubeClient().deletePod(pod));
zkPodList.subList(0, zkPodList.size() - 1).forEach(pod -> kubeClient().deletePod(pod));

if (!Environment.isKRaftModeEnabled()) {
LOGGER.info("Deleting most of the Zookeeper pods");
List<Pod> zkPodList = kubeClient().listPods(controllerSelector);
zkPodList.subList(0, zkPodList.size() - 1).forEach(pod -> kubeClient().deletePod(pod));
StrimziPodSetUtils.waitForAllStrimziPodSetAndPodsReady(Environment.TEST_SUITE_NAMESPACE, sharedClusterName, zkName, ZOOKEEPER_REPLICAS);
}

StrimziPodSetUtils.waitForAllStrimziPodSetAndPodsReady(Environment.TEST_SUITE_NAMESPACE, sharedClusterName, kafkaStrimziPodSet, KAFKA_REPLICAS);
StrimziPodSetUtils.waitForAllStrimziPodSetAndPodsReady(Environment.TEST_SUITE_NAMESPACE, sharedClusterName, zkName, ZOOKEEPER_REPLICAS);
KafkaUtils.waitForKafkaReady(Environment.TEST_SUITE_NAMESPACE, sharedClusterName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import io.strimzi.systemtest.AbstractST;
import io.strimzi.systemtest.Environment;
import io.strimzi.systemtest.TestConstants;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.annotations.ParallelNamespaceTest;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClientsBuilder;
Expand Down Expand Up @@ -80,7 +79,6 @@ public class KafkaRollerST extends AbstractST {
private static final Logger LOGGER = LogManager.getLogger(KafkaRollerST.class);

@ParallelNamespaceTest
@KRaftNotSupported
void testKafkaDoesNotRollsWhenTopicIsUnderReplicated() {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext());
Instant startTime = Instant.now();
Expand Down Expand Up @@ -132,8 +130,9 @@ void testKafkaDoesNotRollsWhenTopicIsUnderReplicated() {
KafkaTopic kafkaTopicWith4Replicas = KafkaTopicTemplates.topic(testStorage.getNamespaceName(), topicNameWith4Replicas, testStorage.getClusterName(), 1, 4, 4).build();
resourceManager.createResourceWithWait(kafkaTopicWith4Replicas);

//Test that the new pod does not have errors or failures in events
String uid = kubeClient(testStorage.getNamespaceName()).getPodUid(KafkaResource.getKafkaPodName(testStorage.getClusterName(), KafkaNodePoolResource.getBrokerPoolName(testStorage.getClusterName()), 3));
// last pod has index 3 (as it is 4th) or 6 (being 7th) as there are also 3 controllers
final int scaledBrokerPodIndex = !Environment.isKRaftModeEnabled() ? 3 : 6;
String uid = kubeClient(testStorage.getNamespaceName()).getPodUid(KafkaResource.getKafkaPodName(testStorage.getClusterName(), KafkaNodePoolResource.getBrokerPoolName(testStorage.getClusterName()), scaledBrokerPodIndex));
List<Event> events = kubeClient(testStorage.getNamespaceName()).listEventsByResourceUid(uid);
assertThat(events, hasAllOfReasons(Scheduled, Pulled, Created, Started));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ void testRecoveryDuringKRaftRollingUpdate() {
@ParallelNamespaceTest
@Tag(ACCEPTANCE)
@Tag(COMPONENT_SCALING)
@KRaftNotSupported("The scaling of the Kafka Pods is not working properly at the moment, topic with extra operators will also need a workaround")
void testKafkaScaleUpScaleDown() {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext());

Expand Down

0 comments on commit c749712

Please sign in to comment.