Skip to content

Commit

Permalink
interop client: fix soak test bug where we can crash if peer wasn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn authored and temawi committed Jul 22, 2022
1 parent b193246 commit d9d8a84
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2054,12 +2054,12 @@ public void performSoakTest(
.withInterceptors(recordClientCallInterceptor(clientCallCapture));
}
SoakIterationResult result = performOneSoakIteration(soakStub);
String peer = clientCallCapture
.get().getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR).toString();
SocketAddress peer = clientCallCapture
.get().getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR);
System.err.print(
String.format(
"soak iteration: %d elapsed_ms: %d peer: %s",
i, result.getLatencyMs(), peer));
i, result.getLatencyMs(), peer != null ? peer.toString() : "null"));
if (!result.getStatus().equals(Status.OK)) {
totalFailures++;
System.err.println(String.format(" failed: %s", result.getStatus()));
Expand Down

0 comments on commit d9d8a84

Please sign in to comment.