Skip to content

Commit

Permalink
Fix OOM errors that happen occasionally
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-mastrangelo committed Jan 29, 2016
1 parent ba54513 commit 8a40989
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,13 @@ public void veryLargeResponse() throws Exception {
request.responseSize = unaryPayloadLength();
request.responseType = Messages.COMPRESSABLE;

SimpleResponse resp = blockingStub.unaryCall(request);
final SimpleResponse goldenResponse = new SimpleResponse();
goldenResponse.payload = new Payload();
goldenResponse.payload.type = Messages.COMPRESSABLE;
goldenResponse.payload.body = new byte[unaryPayloadLength()];

assertMessageSizeEquals(goldenResponse, blockingStub.unaryCall(request));
assertMessageSizeEquals(goldenResponse, resp);
}

public void deadlineNotExceeded() {
Expand Down

0 comments on commit 8a40989

Please sign in to comment.