Skip to content

Commit 65f7536

Browse files
authored
Remove reduntant deprecation supressions from System Tests (#12614)
Signed-off-by: Jakub Scholz <www@scholzj.com>
1 parent 04fc3db commit 65f7536

File tree

6 files changed

+4
-45
lines changed

6 files changed

+4
-45
lines changed

systemtest/src/test/java/io/strimzi/systemtest/cruisecontrol/CruiseControlST.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ void testCruiseControlChangesFromRebalancingtoProposalReadyWhenSpecUpdated() {
289289
@Label(value = TestDocsLabels.CRUISE_CONTROL),
290290
}
291291
)
292-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
293292
void testCruiseControlWithSingleNodeKafka() {
294293
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
295294

@@ -506,7 +505,6 @@ void testCruiseControlIntraBrokerBalancing() {
506505
@Label(value = TestDocsLabels.CRUISE_CONTROL),
507506
}
508507
)
509-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
510508
void testCruiseControlDuringBrokerScaleUpAndDown() {
511509
TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext(), TestConstants.CO_NAMESPACE);
512510
final int initialReplicas = 3;
@@ -648,7 +646,6 @@ void testKafkaRebalanceAutoApprovalMechanism() {
648646
@Label(value = TestDocsLabels.CRUISE_CONTROL),
649647
}
650648
)
651-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
652649
void testAutoKafkaRebalanceScaleUpScaleDown() {
653650
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
654651
final String scaleUpKafkaRebalanceTemplateName = testStorage.getClusterName() + "-scale-up";

systemtest/src/test/java/io/strimzi/systemtest/kafka/KafkaST.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ void testRemoveComponentsFromEntityOperator() {
376376
@Label(value = TestDocsLabels.KAFKA)
377377
}
378378
)
379-
@SuppressWarnings("deprecation") // Storage is deprecated, but some API methods are still called here
380379
void testKafkaJBODDeleteClaimsTrueFalse() {
381380
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
382381
final int kafkaReplicas = 2;
@@ -398,13 +397,7 @@ void testKafkaJBODDeleteClaimsTrueFalse() {
398397
KafkaNodePoolTemplates.controllerPool(testStorage.getNamespaceName(), testStorage.getControllerPoolName(), testStorage.getClusterName(), kafkaReplicas).build()
399398
);
400399

401-
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), kafkaReplicas)
402-
.editSpec()
403-
.editKafka()
404-
.withStorage(jbodStorage)
405-
.endKafka()
406-
.endSpec()
407-
.build());
400+
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), kafkaReplicas).build());
408401

409402
Map<String, String> brokerPods = PodUtils.podSnapshot(testStorage.getNamespaceName(), testStorage.getBrokerSelector());
410403
// kafka cluster already deployed
@@ -1041,7 +1034,6 @@ void testDeployUnsupportedKafka() {
10411034
@Label(value = TestDocsLabels.KAFKA)
10421035
}
10431036
)
1044-
@SuppressWarnings("deprecation") // Storage is deprecated, but some API methods are still called here
10451037
void testResizeJbodVolumes() {
10461038
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
10471039
final int numberOfKafkaReplicas = 3;
@@ -1065,17 +1057,7 @@ void testResizeJbodVolumes() {
10651057
.build(),
10661058
KafkaNodePoolTemplates.controllerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getControllerPoolName(), testStorage.getClusterName(), 3).build()
10671059
);
1068-
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), numberOfKafkaReplicas)
1069-
.editSpec()
1070-
.editKafka()
1071-
.withStorage(
1072-
new JbodStorageBuilder()
1073-
// add two small volumes
1074-
.addToVolumes(vol0, vol1)
1075-
.build())
1076-
.endKafka()
1077-
.endSpec()
1078-
.build());
1060+
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), numberOfKafkaReplicas).build());
10791061

10801062
KubeResourceManager.get().createResourceWithWait(KafkaTopicTemplates.topic(testStorage).build());
10811063

systemtest/src/test/java/io/strimzi/systemtest/operators/MultipleClusterOperatorsST.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ void testMultipleCOsInDifferentNamespaces() {
251251
*/
252252
@IsolatedTest
253253
@Tag(CRUISE_CONTROL)
254-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
255254
void testKafkaCCAndRebalanceWithMultipleCOs() {
256255
assumeFalse(Environment.isNamespaceRbacScope());
257256
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext(), DEFAULT_NAMESPACE);

systemtest/src/test/java/io/strimzi/systemtest/operators/ReconciliationST.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public class ReconciliationST extends AbstractST {
6363
@ParallelNamespaceTest
6464
@Tag(CONNECT)
6565
@Tag(CONNECT_COMPONENTS)
66-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
6766
@TestDoc(
6867
description = @Desc("This test verifies that pause reconciliation annotation prevents changes from being applied to `Kafka`, `KafkaConnect`, and `KafkaConnector` resources, and that resuming reconciliation applies pending changes."),
6968
steps = {

systemtest/src/test/java/io/strimzi/systemtest/rollingupdate/AlternativeReconcileTriggersST.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ void testManualRollingUpdateForSinglePod() {
334334
* - persistent-volume-claims
335335
*/
336336
@ParallelNamespaceTest
337-
@SuppressWarnings("deprecation") // Storage is deprecated, but some API methods are still called here
338337
void testAddingAndRemovingJbodVolumes() {
339338
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
340339

@@ -352,13 +351,7 @@ void testAddingAndRemovingJbodVolumes() {
352351
.build(),
353352
KafkaNodePoolTemplates.controllerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getControllerPoolName(), testStorage.getClusterName(), 3).build()
354353
);
355-
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), 3)
356-
.editSpec()
357-
.editKafka()
358-
.withStorage(new JbodStorageBuilder().addToVolumes(vol0).build())
359-
.endKafka()
360-
.endSpec()
361-
.build());
354+
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), 3).build());
362355

363356
Map<String, String> brokerPods = PodUtils.podSnapshot(testStorage.getNamespaceName(), testStorage.getBrokerSelector());
364357

@@ -466,7 +459,6 @@ void testAddingAndRemovingJbodVolumes() {
466459
* - KRaft metadata log
467460
*/
468461
@ParallelNamespaceTest
469-
@SuppressWarnings("deprecation") // Storage is deprecated, but some API methods are still called here
470462
void testJbodMetadataLogRelocation() {
471463
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
472464
final int numberOfKafkaReplicas = 3;
@@ -492,16 +484,7 @@ void testJbodMetadataLogRelocation() {
492484
.build(),
493485
KafkaNodePoolTemplates.controllerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getControllerPoolName(), testStorage.getClusterName(), 3).build()
494486
);
495-
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), numberOfKafkaReplicas)
496-
.editSpec()
497-
.editKafka()
498-
.withStorage(
499-
new JbodStorageBuilder()
500-
.addToVolumes(vol, otherVol, metadataVol)
501-
.build())
502-
.endKafka()
503-
.endSpec()
504-
.build());
487+
KubeResourceManager.get().createResourceWithWait(KafkaTemplates.kafka(testStorage.getNamespaceName(), testStorage.getClusterName(), numberOfKafkaReplicas).build());
505488

506489
KubeResourceManager.get().createResourceWithWait(KafkaTopicTemplates.topic(testStorage).build());
507490

systemtest/src/test/java/io/strimzi/systemtest/rollingupdate/KafkaRollerST.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public class KafkaRollerST extends AbstractST {
7878
private static final Logger LOGGER = LogManager.getLogger(KafkaRollerST.class);
7979

8080
@ParallelNamespaceTest
81-
@SuppressWarnings("deprecation") // Replicas in Kafka CR are deprecated, but some API methods are still called here
8281
void testKafkaDoesNotRollsWhenTopicIsUnderReplicated() {
8382
final TestStorage testStorage = new TestStorage(KubeResourceManager.get().getTestContext());
8483
Instant startTime = Instant.now();

0 commit comments

Comments
 (0)