Bael 679 reactive streams (#1978)

* BAEL-679 code for reactive streams

* BAEL-679 typo

* BAEL-679 awaitility
This commit is contained in:
Tomasz Lelek
2017-06-02 21:42:30 +02:00
committed by Grzegorz Piwowarek
parent af40bd48f0
commit 49ce027993
2 changed files with 18 additions and 6 deletions
@@ -24,8 +24,10 @@ public class ReactiveStreamsTest {
publisher.close();
//then
Thread.sleep(1000);
assertThat(subscriber.consumedElements).containsExactlyElementsOf(items);
await().atMost(1000, TimeUnit.MILLISECONDS).until(
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(items)
);
}
@Test
@@ -44,8 +46,9 @@ public class ReactiveStreamsTest {
publisher.close();
//then
Thread.sleep(1000);
assertThat(subscriber.consumedElements).containsExactlyElementsOf(expectedResult);
await().atMost(1000, TimeUnit.MILLISECONDS).until(
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(expectedResult)
);
}
@Test
@@ -63,7 +66,8 @@ public class ReactiveStreamsTest {
publisher.close();
//then
Thread.sleep(1000);
assertThat(subscriber.consumedElements).containsExactlyElementsOf(expected);
await().atMost(1000, TimeUnit.MILLISECONDS).until(
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(expected)
);
}
}