KAFKA-8026: Fix for flaky RegexSourceIntegrationTest#6459
KAFKA-8026: Fix for flaky RegexSourceIntegrationTest#6459bbejeck merged 3 commits intoapache:1.1from
Conversation
|
ping @guozhangwang @mjsax @vvcephei @ableegoldman for review |
| STRING_SERDE_CLASSNAME, | ||
| STRING_SERDE_CLASSNAME, | ||
| properties); | ||
| streamsConfiguration = StreamsTestUtils.getStreamsConfig(UUID.randomUUID().toString(), |
|
Java 10 passed Updating per comments and reverting the change from the original cherry-pick. |
|
All tests passed. Kicking off another build to ensure flakiness fixed. retest this please |
|
All tests passed, running again to ensure stability. retest this please |
| TestUtils.waitForCondition(new TestCondition() { | ||
| @Override | ||
| public boolean conditionMet() { | ||
| return assignedTopics.equals(expectedFirstAssignment); |
There was a problem hiding this comment.
I was curious and still have Java7 installed and could reproduce the issue.
The lists are not sorted here and thus the check fails.
The reason is the following exception:
java.lang.UnsupportedOperationException
at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1049)
at java.util.Collections.sort(Collections.java:159)
at org.apache.kafka.streams.integration.RegexSourceIntegrationTest$TheConsumerRebalanceListener.onPartitionsAssigned(RegexSourceIntegrationTest.java:445)
Seems CopyOnWriteArrayList cannot be sorted.
|
Unrelated failure in Java10 -- Java7 and Java8 passed. Retest this please. |
|
Java8 failure unrelated. Java7 and Java10 passed. Retest this please. |
|
@mjsax I've fixed the |
|
Still +1 Call for second review anyof @guozhangwang @vvcephei @ableegoldman |
guozhangwang
left a comment
There was a problem hiding this comment.
One nit, otherwise lgtm, thanks @bbejeck !
| final List<String> assignedTopics = new CopyOnWriteArrayList<>(); | ||
| streams = new KafkaStreams(builder.build(), streamsConfig, new DefaultKafkaClientSupplier() { | ||
| final List<String> assignedTopics = new ArrayList<>(); | ||
| final KafkaStreams streams = new KafkaStreams(builder.build(), streamsConfig, new DefaultKafkaClientSupplier() { |
There was a problem hiding this comment.
KafkaStreams is AutoCloseable now so you can include its construction inside the try block. Ditto elsewhere.
There was a problem hiding this comment.
Thanks @guozhangwang this PR is for the 1.1 branch so KafkaStreams does not implement AutoCloseable in branches < 2.0
|
Merged #6459 into 1.1 |
This PR is an attempt to fix the
RegexSourceIntegrationTestflakiness. My investigation did not reveal any issues, and I was unable to reproduce the failure locally. So I've taken some steps to eliminate what I think could be a race condition in the test.KafkaStreamsinstance local to each test.If the Jenkins build is all green for this PR, I will create a separate PR for
1.0and make the same fixes up from2.0totrunkI ran the entire suite of streams tests.
Committer Checklist (excluded from commit message)