mirror of https://github.com/grpc/grpc-java.git
context, stub: check result of CountDownLatch.await() in test (#6664)
This commit is contained in:
parent
307f7d0e09
commit
2734e22ef5
|
@ -609,7 +609,7 @@ public class ContextTest {
|
|||
latch.countDown();
|
||||
}
|
||||
}, MoreExecutors.directExecutor());
|
||||
latch.await(3, TimeUnit.SECONDS);
|
||||
assertTrue("cancellation failed", latch.await(3, TimeUnit.SECONDS));
|
||||
if (error.get() != null) {
|
||||
throw error.get();
|
||||
}
|
||||
|
|
|
@ -498,7 +498,7 @@ public class ServerCallsTest {
|
|||
semaphore.acquire();
|
||||
clientCall.request(3);
|
||||
clientCall.halfClose();
|
||||
latch.await(5, TimeUnit.SECONDS);
|
||||
assertThat(latch.await(5, TimeUnit.SECONDS)).isTrue();
|
||||
// Very that number of messages produced in each onReady handler call matches the number
|
||||
// requested by the client.
|
||||
assertArrayEquals(new int[]{0, 1, 1, 2, 2, 2}, receivedMessages);
|
||||
|
|
Loading…
Reference in New Issue