Skip to content

Commit fb74646

Browse files
committed
#607 - Fix flaky test in MockBrockerClientIT
- add "atLeastOnce()" to the verify calls in MockBrokerClientIT.testPublishQuery
1 parent 7ef52c3 commit fb74646

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/de/numcodex/feasibility_gui_backend/query/broker/mock/MockBrokerClientIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void testPublishQuery() throws QueryNotFoundException, SiteNotFoundException {
3434
client.addQueryStatusListener(statusListener);
3535
client.publishQuery(brokerQueryId);
3636

37-
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS)).onClientUpdate(
37+
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS).atLeastOnce()).onClientUpdate(
3838
TEST_BACKEND_QUERY_ID,
3939
QueryStatusUpdate.builder()
4040
.source(client)
@@ -43,7 +43,7 @@ void testPublishQuery() throws QueryNotFoundException, SiteNotFoundException {
4343
.status(COMPLETED)
4444
.build()
4545
);
46-
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS)).onClientUpdate(
46+
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS).atLeastOnce()).onClientUpdate(
4747
TEST_BACKEND_QUERY_ID,
4848
QueryStatusUpdate.builder()
4949
.source(client)
@@ -52,7 +52,7 @@ void testPublishQuery() throws QueryNotFoundException, SiteNotFoundException {
5252
.status(COMPLETED)
5353
.build()
5454
);
55-
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS)).onClientUpdate(
55+
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS).atLeastOnce()).onClientUpdate(
5656
TEST_BACKEND_QUERY_ID,
5757
QueryStatusUpdate.builder()
5858
.source(client)
@@ -61,7 +61,7 @@ void testPublishQuery() throws QueryNotFoundException, SiteNotFoundException {
6161
.status(COMPLETED)
6262
.build()
6363
);
64-
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS)).onClientUpdate(
64+
verify(statusListener, timeout(ASYNC_TIMEOUT_WAIT_MS).atLeastOnce()).onClientUpdate(
6565
TEST_BACKEND_QUERY_ID,
6666
QueryStatusUpdate.builder()
6767
.source(client)

0 commit comments

Comments
 (0)