Skip to content

Commit 0ebc3e8

Browse files
authored
MINOR Mar 12 Flaky tests (apache#19190)
Mark the following tests as flaky: * StickyAssignorTest > testLargeAssignmentAndGroupWithUniformSubscription * DeleteSegmentsByRetentionTimeTest * QuorumControllerTest > testUncleanShutdownBrokerElrEnabled Reviewers: Andrew Schofield <[email protected]>
1 parent e1d980a commit 0ebc3e8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,7 @@ project(':metadata') {
13011301
testImplementation project(':clients').sourceSets.test.output
13021302
testImplementation project(':raft').sourceSets.test.output
13031303
testImplementation project(':server-common').sourceSets.test.output
1304+
testImplementation project(':test-common:test-common-util')
13041305

13051306
testRuntimeOnly runtimeTestLibs
13061307

@@ -2234,6 +2235,7 @@ project(':storage') {
22342235
testImplementation project(':core').sourceSets.test.output
22352236
testImplementation project(':test-common:test-common-internal-api')
22362237
testImplementation project(':test-common:test-common-runtime')
2238+
testImplementation project(':test-common:test-common-util')
22372239
testImplementation project(':server')
22382240
testImplementation project(':server-common')
22392241
testImplementation project(':server-common').sourceSets.test.output

clients/src/test/java/org/apache/kafka/clients/consumer/StickyAssignorTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@
2424
import org.apache.kafka.common.PartitionInfo;
2525
import org.apache.kafka.common.TopicPartition;
2626
import org.apache.kafka.common.protocol.types.Struct;
27+
import org.apache.kafka.common.test.api.Flaky;
2728
import org.apache.kafka.common.utils.CollectionUtils;
2829

2930
import org.junit.jupiter.api.Test;
31+
import org.junit.jupiter.api.Timeout;
3032
import org.junit.jupiter.params.ParameterizedTest;
3133
import org.junit.jupiter.params.provider.Arguments;
3234
import org.junit.jupiter.params.provider.EnumSource;
3335
import org.junit.jupiter.params.provider.MethodSource;
36+
import org.junit.jupiter.params.provider.ValueSource;
3437

3538
import java.nio.ByteBuffer;
3639
import java.util.ArrayList;
@@ -45,6 +48,7 @@
4548

4649
import static java.util.Collections.emptyList;
4750
import static org.apache.kafka.clients.consumer.StickyAssignor.serializeTopicPartitionAssignment;
51+
import static org.apache.kafka.clients.consumer.internals.AbstractPartitionAssignorTest.TEST_NAME_WITH_CONSUMER_RACK;
4852
import static org.apache.kafka.clients.consumer.internals.AbstractPartitionAssignorTest.TEST_NAME_WITH_RACK_CONFIG;
4953
import static org.apache.kafka.clients.consumer.internals.AbstractStickyAssignor.DEFAULT_GENERATION;
5054
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -81,6 +85,14 @@ public ByteBuffer generateUserData(List<String> topics, List<TopicPartition> par
8185
return serializeTopicPartitionAssignment(new MemberData(partitions, Optional.of(generation)));
8286
}
8387

88+
@Timeout(30)
89+
@ParameterizedTest(name = TEST_NAME_WITH_CONSUMER_RACK)
90+
@ValueSource(booleans = {false, true})
91+
@Flaky(value = "KAFKA-18797", comment = "Remove this override once the flakiness has been resolved.")
92+
public void testLargeAssignmentAndGroupWithUniformSubscription(boolean hasConsumerRack) {
93+
super.testLargeAssignmentAndGroupWithUniformSubscription(hasConsumerRack);
94+
}
95+
8496
@ParameterizedTest(name = TEST_NAME_WITH_RACK_CONFIG)
8597
@EnumSource(RackConfig.class)
8698
public void testAllConsumersHaveOwnedPartitionInvalidatedWhenClaimedByMultipleConsumersInSameGenerationWithEqualPartitionsPerConsumer(RackConfig rackConfig) {

metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import org.apache.kafka.common.requests.ApiError;
6767
import org.apache.kafka.common.security.auth.KafkaPrincipal;
6868
import org.apache.kafka.common.security.auth.SecurityProtocol;
69+
import org.apache.kafka.common.test.api.Flaky;
6970
import org.apache.kafka.common.utils.LogContext;
7071
import org.apache.kafka.common.utils.Time;
7172
import org.apache.kafka.common.utils.Utils;
@@ -378,6 +379,7 @@ public void testElrEnabledByDefault() throws Throwable {
378379
}
379380
}
380381

382+
@Flaky("KAFKA-18845")
381383
@Test
382384
public void testUncleanShutdownBrokerElrEnabled() throws Throwable {
383385
List<Integer> allBrokers = Arrays.asList(1, 2, 3);

storage/src/test/java/org/apache/kafka/tiered/storage/integration/DeleteSegmentsByRetentionTimeTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
package org.apache.kafka.tiered.storage.integration;
1818

1919
import org.apache.kafka.common.config.TopicConfig;
20+
import org.apache.kafka.common.test.api.Flaky;
2021

2122
import java.util.Collections;
2223
import java.util.Map;
2324

25+
@Flaky("KAFKA-18606")
2426
public final class DeleteSegmentsByRetentionTimeTest extends BaseDeleteSegmentsTest {
2527

2628
@Override

0 commit comments

Comments
 (0)