Bael 679 reactive streams (#1978)
* BAEL-679 code for reactive streams * BAEL-679 typo * BAEL-679 awaitility
This commit is contained in:
parent
af40bd48f0
commit
49ce027993
|
@ -47,6 +47,13 @@
|
||||||
<version>${mockito.version}</version>
|
<version>${mockito.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jayway.awaitility</groupId>
|
||||||
|
<artifactId>awaitility</artifactId>
|
||||||
|
<version>${awaitility.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -90,6 +97,7 @@
|
||||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||||
<junit.version>4.12</junit.version>
|
<junit.version>4.12</junit.version>
|
||||||
<mockito.version>1.10.19</mockito.version>
|
<mockito.version>1.10.19</mockito.version>
|
||||||
|
<awaitility.version>1.7.0</awaitility.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -24,8 +24,10 @@ public class ReactiveStreamsTest {
|
||||||
publisher.close();
|
publisher.close();
|
||||||
|
|
||||||
//then
|
//then
|
||||||
Thread.sleep(1000);
|
|
||||||
assertThat(subscriber.consumedElements).containsExactlyElementsOf(items);
|
await().atMost(1000, TimeUnit.MILLISECONDS).until(
|
||||||
|
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(items)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -44,8 +46,9 @@ public class ReactiveStreamsTest {
|
||||||
publisher.close();
|
publisher.close();
|
||||||
|
|
||||||
//then
|
//then
|
||||||
Thread.sleep(1000);
|
await().atMost(1000, TimeUnit.MILLISECONDS).until(
|
||||||
assertThat(subscriber.consumedElements).containsExactlyElementsOf(expectedResult);
|
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(expectedResult)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -63,7 +66,8 @@ public class ReactiveStreamsTest {
|
||||||
publisher.close();
|
publisher.close();
|
||||||
|
|
||||||
//then
|
//then
|
||||||
Thread.sleep(1000);
|
await().atMost(1000, TimeUnit.MILLISECONDS).until(
|
||||||
assertThat(subscriber.consumedElements).containsExactlyElementsOf(expected);
|
() -> assertThat(subscriber.consumedElements).containsExactlyElementsOf(expected)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue