From 6bbb4cfef447868e6378f6995a9ac2d9c2e73cfe Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 22 Feb 2017 20:36:42 +0000 Subject: [PATCH] Fixed failing reactive test --- .../src/test/java/com/baeldung/reactor/ReactorTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactor-core/src/test/java/com/baeldung/reactor/ReactorTest.java b/reactor-core/src/test/java/com/baeldung/reactor/ReactorTest.java index a90346803e..6c30691f26 100644 --- a/reactor-core/src/test/java/com/baeldung/reactor/ReactorTest.java +++ b/reactor-core/src/test/java/com/baeldung/reactor/ReactorTest.java @@ -92,7 +92,7 @@ public class ReactorTest { } @Test - public void givenFlux_whenInParalle_shouldSubscribeInDifferentThreads() { + public void givenFlux_whenInParalle_shouldSubscribeInDifferentThreads() throws InterruptedException { List elements = new ArrayList<>(); Flux.just(1, 2, 3, 4) @@ -101,6 +101,8 @@ public class ReactorTest { .subscribeOn(Schedulers.parallel()) .subscribe(elements::add); + Thread.sleep(1000); + assertThat(elements).containsExactly(2, 4, 6, 8); }