Skip to content

Commit

Permalink
SCB-164 added waiting for async update to fix random test failures
Browse files Browse the repository at this point in the history
Signed-off-by: seanyinx <sean.yin@huawei.com>
  • Loading branch information
seanyinx committed Jan 10, 2018
1 parent 88cebbd commit b349c19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void closeStreamOnDisconnected() {
omegaCallbacks.get(serviceConfig.getServiceName()).containsKey(serviceConfig.getInstanceId()),
is(false));

assertThat(compensateResponseObserver.isCompleted(), is(true));
await().atMost(1, SECONDS).until(compensateResponseObserver::isCompleted);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public void considerFasterServerFirst() throws Exception {
messageSender.send(event);
messageSender.send(event);

assertThat(eventsMap.get(8080).size(), is(3));
await().atMost(1, SECONDS).until(() -> eventsMap.get(8080).size() == 3);
assertThat(eventsMap.get(8090).size(), is(1));
}

Expand Down

0 comments on commit b349c19

Please sign in to comment.