mirror of https://github.com/grpc/grpc-java.git
interop-testing: Improve failure messages for ping_ping
Timeouts and Status returns can be common, and previously those cases weren't that clear. For example, if there was a StatusRuntimeException it would just print the status code and message, but not the causal chain.
This commit is contained in:
parent
ae1fb9467c
commit
ca7b3dad11
|
|
@ -703,8 +703,12 @@ public abstract class AbstractInteropTest {
|
|||
for (int i = 0; i < requests.size(); i++) {
|
||||
assertNull(queue.peek());
|
||||
requestObserver.onNext(requests.get(i));
|
||||
assertEquals(goldenResponses.get(i),
|
||||
queue.poll(operationTimeoutMillis(), TimeUnit.MILLISECONDS));
|
||||
Object actualResponse = queue.poll(operationTimeoutMillis(), TimeUnit.MILLISECONDS);
|
||||
assertNotNull("Timed out waiting for response", actualResponse);
|
||||
if (actualResponse instanceof Throwable) {
|
||||
throw new AssertionError((Throwable) actualResponse);
|
||||
}
|
||||
assertEquals(goldenResponses.get(i), actualResponse);
|
||||
}
|
||||
requestObserver.onCompleted();
|
||||
assertEquals("Completed", queue.poll(operationTimeoutMillis(), TimeUnit.MILLISECONDS));
|
||||
|
|
|
|||
Loading…
Reference in New Issue