raboof commented on code in PR #1868: URL: https://github.com/apache/pekko/pull/1868#discussion_r2109337578
########## stream-tests/src/test/java/org/apache/pekko/stream/javadsl/SourceTest.java: ########## @@ -816,6 +816,14 @@ public void mustBeAbleToUseStatefulMap() throws Exception { Assert.assertEquals("[1, 2][3, 4][5]", grouped.toCompletableFuture().get(3, TimeUnit.SECONDS)); } + @Test + public void mustBeAbleToUseDistinctUntilChanged() throws Exception { + final java.lang.Iterable<Integer> input = Arrays.asList(1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5); Review Comment: (here, too) ########## docs/src/test/java/jdocs/stream/operators/SourceOrFlow.java: ########## @@ -608,6 +608,20 @@ void filterNotExample() { // #filterNot } + void distinctUntilChangedExample() { + // #distinctUntilChanged + Source.from(Arrays.asList(1, 2, 2, 3, 3, 4)) + .distinctUntilChanged() + .runForeach(System.out::println, system); + // prints: + // 1 + // 2 + // 3 + // 4 Review Comment: Can we add another '2' to the example to show what happens when a value shows up that has been seen before, but was not the most recent value? -- 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: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org