|
|
|
@ -79,6 +79,14 @@ public abstract class AbstractHttpHandlerIntegrationTests { |
|
|
|
|
/** |
|
|
|
|
* Return an interval stream of with n number of ticks and buffer the |
|
|
|
|
* emissions to avoid back pressure failures (e.g. on slow CI server). |
|
|
|
|
* |
|
|
|
|
* <p>Use this method as follows: |
|
|
|
|
* <ul> |
|
|
|
|
* <li>Tests that verify N number of items followed by verifyOnComplete() |
|
|
|
|
* should set the number of emissions to N. |
|
|
|
|
* <li>Tests that verify N number of items followed by thenCancel() should |
|
|
|
|
* set the number of buffered to an arbitrary number greater than N. |
|
|
|
|
* </ul> |
|
|
|
|
*/ |
|
|
|
|
public static Flux<Long> interval(Duration period, int count) { |
|
|
|
|
return Flux.interval(period).take(count).onBackpressureBuffer(2); |
|
|
|
|