cadonna commented on code in PR #13927:
URL: https://github.com/apache/kafka/pull/13927#discussion_r1257992420
##########
streams/src/test/java/org/apache/kafka/streams/integration/KTableKTableForeignKeyInnerJoinCustomPartitionerIntegrationTest.java:
##########
@@ -207,11 +207,12 @@ public void
shouldThrowIllegalArgumentExceptionWhenCustomPartitionerReturnsMulti
});
}
- startApplicationAndWaitUntilRunning(kafkaStreamsList, ofSeconds(120));
+ for (final KafkaStreams stream: kafkaStreamsList) {
+ stream.start();
+ }
Review Comment:
I am not sure I understand what you are asking, so bear with me if my reply
is not the one you expected.
Adding
```
waitForApplicationState(Arrays.asList(streams, streamsTwo, streamsThree),
KafkaStreams.State.RUNNING, ofSeconds(60))
```
after starting all Streams clients makes the test flaky because with the
state updater NOT all clients need to be in `RUNNING` before a Streams client
transits to `ERROR`. Not even the Streams client that throws the exception
needs to be in `RUNNING` before transitioning to `ERROR`.
Actually, now that I looked more at this code, I am wondering why this test
was not flaky before my changes. Each Streams client is started independently.
That means, there is no guarantee, that all three Streams clients are `RUNNING`
at the same time. I did some testing with `Thread.sleep()` after each client
were started to simulate delays in processing in the version of the test before
my changes and the test was flaky indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]