apilloud commented on code in PR #24644:
URL: https://github.com/apache/beam/pull/24644#discussion_r1046583132


##########
sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/WatchTest.java:
##########
@@ -364,14 +363,8 @@ public void testMultiplePollsWithManyResults() {
                               .map(extractValueFn::apply)
                               .collect(Collectors.toList()))
                       .size());
-              assertThat(
-                  "Poll called more than once",
-                  Sets.newHashSet(
-                          StreamSupport.stream(outputs.spliterator(), false)
-                              .map(extractTimestampFn::apply)
-                              .collect(Collectors.toList()))
-                      .size(),
-                  greaterThan(1));
+              assertTrue("Poll called more than once", 
StreamSupport.stream(outputs.spliterator(), false)
+                  
.map(extractTimestampFn::apply).collect(Collectors.toSet()).size() > 0);

Review Comment:
   I'm not sure I understand this fix. When this fails we won't have any debug 
info, why stop using the greaterThan Matcher (`greaterThan(0)` should be 
equivalent)? Shouldn't the condition be `> 1` as it is verifying that watch is 
called more than once?



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