Skip to content

Commit

Permalink
Fix CancelWorkOnEmptyWindowTruncation test (Azure#41127)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy authored Jul 12, 2024
1 parent e312d67 commit afb6edc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ public void shouldCancelWorkOnEmptyWindowTruncation() {
upstream.subscribe(subscriber);

EnqueueResult<Integer> r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
final Flux<Integer> windowFlux = r.getWindowFlux().take(cancelAfter);
// Starting from reactor-core-3.6.x, if we use take(n:0) to take none, downstream will be 'completed' without
// 'canceling' upstream. To make it cancel upstream, use take(n:0, limitRequest:false).
// https://github.com/reactor/reactor-core/issues/3839
final Flux<Integer> windowFlux = r.getWindowFlux().take(cancelAfter, false);

StepVerifier.create(windowFlux).verifyComplete();

Expand Down

0 comments on commit afb6edc

Please sign in to comment.