mjsax commented on code in PR #20070:
URL: https://github.com/apache/kafka/pull/20070#discussion_r2176027337


##########
streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java:
##########
@@ -522,7 +522,11 @@ private static VerificationResult verifyAll(final 
Map<String, Set<Integer>> inpu
         }
         boolean pass;
         try (final PrintStream resultStream = new 
PrintStream(byteArrayOutputStream)) {
-            pass = verifyTAgg(resultStream, inputs, events.get("tagg"), 
validationPredicate, printResults);
+            pass = true;
+            if (eosEnabled) {
+                // TAGG is computing "Count-by-count", which may produce keys 
that are not in the input data in ALOS, so we skip validation in this case.
+                pass = verifyTAgg(resultStream, inputs, events.get("tagg"), 
printResults);

Review Comment:
   But isn't this why we set a different `validationPredicate` for ALOS, and 
don't use equals, but lessEquals, to say `expectedCount <= actualCount` ?



##########
streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java:
##########
@@ -694,7 +700,7 @@ private static boolean verifyTAgg(final PrintStream 
resultStream,
                     expectedCount = 0L;
                 }
 
-                if (!validationPredicate.test(expectedCount, 
entry.getValue().getLast().value())) {
+                if (entry.getValue().getLast().value().longValue() != 
expectedCount) {

Review Comment:
   Should be ok to not check this -- it would mean we did not get any data for 
a particular key, what would be quite some data-loss issue.



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

Reply via email to