Skip to content

Commit

Permalink
[test] Disable asynchrony in OnDiscard bufferTimeout test (#3861)
Browse files Browse the repository at this point in the history
Recent test failures were observed where `bufferTimeout` case in
`OnDiscardShouldNotLeakTest` failed occasionally due to flaky behaviour
caused by the discard happening shortly after the assertion failed. The
reason was a tiny delay which was not coordinated with the assertion.
This change disables the asynchronous behaviour of the case.
  • Loading branch information
chemicL authored Aug 6, 2024
1 parent 445c6d3 commit bd75614
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public class OnDiscardShouldNotLeakTest {
DiscardScenario.fluxSource("monoFilterWhenFalse", main -> main.last().filterWhen(__ -> Mono.just(false).hide())),
DiscardScenario.fluxSource("last", main -> main.last(new Tracked("default")).flatMap(f -> Mono.just(f).hide())),
DiscardScenario.fluxSource("flatMapIterable", f -> f.flatMapIterable(Arrays::asList)),
DiscardScenario.fluxSource("bufferTimeout", f -> f.bufferTimeout(2, Duration.ofMillis(1), true).flatMapIterable(Function.identity())),
// no asynchronicity is supported in these tests so long timeout is used to be
// effectively disabled in bufferTimeout test:
DiscardScenario.fluxSource("bufferTimeout", f -> f.bufferTimeout(2, Duration.ofDays(1), true).flatMapIterable(Function.identity())),
DiscardScenario.fluxSource("publishOnDelayErrors", f -> f.publishOn(Schedulers.immediate())),
DiscardScenario.fluxSource("publishOnImmediateErrors", f -> f.publishOn(Schedulers.immediate(), false, Queues.SMALL_BUFFER_SIZE)),
DiscardScenario.fluxSource("publishOnAndPublishOn", main -> main
Expand Down

0 comments on commit bd75614

Please sign in to comment.