mjsax commented on a change in pull request #9733:
URL: https://github.com/apache/kafka/pull/9733#discussion_r548160122



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/integration/EosBetaUpgradeIntegrationTest.java
##########
@@ -246,18 +261,19 @@ public void shouldUpgradeFromEosAlphaToEosBeta() throws 
Exception {
             assignmentListener.waitForNextStableAssignment(MAX_WAIT_TIME_MS);
             waitForRunning(stateTransitions1);
 
-            streams2Alpha = getKafkaStreams("appDir2", 
StreamsConfig.EXACTLY_ONCE);
+            streams2Alpha = getKafkaStreams(APP_DIR_2, 
StreamsConfig.EXACTLY_ONCE);
             streams2Alpha.setStateListener(
                 (newState, oldState) -> 
stateTransitions2.add(KeyValue.pair(oldState, newState))
             );
             stateTransitions1.clear();
 
-            assignmentListener.prepareForRebalance();
+            prevNumAssignments = assignmentListener.prepareForRebalance();
             streams2Alpha.cleanUp();
             streams2Alpha.start();
             assignmentListener.waitForNextStableAssignment(MAX_WAIT_TIME_MS);
+            expectedNumAssignments = assignmentListener.numTotalAssignments() 
- prevNumAssignments;
+            waitForNumRebalancingToRunning(stateTransitions2, 
expectedNumAssignments);
             waitForRunning(stateTransitions1);

Review comment:
       If you reasoning is right, do we need to use 
`waitForNumRebalancingToRunning` here, too? If there are multiple rebalances, 
both clients would participate?
   
   Also, you PR does not update all stages when we wait for state changes. Why? 
Would we not need to apply to logic each time?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to