You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/12/13 01:50:48 UTC
[GitHub] [beam] apilloud commented on a diff in pull request #24644: [19734] Fix WatchTest.testMultiplePollsWithManyResults test
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org