Merge pull request #19298 from muxi/test-timeout-crash

Resolve delayed callback crash
pull/19308/head
Muxi Yan 6 years ago committed by GitHub
commit 658eeaf352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/objective-c/tests/InteropTests/InteropTests.m

@ -701,21 +701,21 @@ initWithInterceptorManager:(GRPCInterceptorManager *)interceptorManager
XCTAssertNotNil([[self class] host]);
__weak XCTestExpectation *expectation =
[self expectationWithDescription:@"HigherResponseSizeLimit"];
__block NSError *callError = nil;
RMTSimpleRequest *request = [RMTSimpleRequest message];
const size_t kPayloadSize = 5 * 1024 * 1024; // 5MB
request.responseSize = kPayloadSize;
[GRPCCall setResponseSizeLimit:6 * 1024 * 1024 forHost:[[self class] host]];
[_service unaryCallWithRequest:request
handler:^(RMTSimpleResponse *response, NSError *error) {
XCTAssertNil(error, @"Finished with unexpected error: %@", error);
XCTAssertEqual(response.payload.body.length, kPayloadSize);
callError = error;
[expectation fulfill];
}];
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
XCTAssertNil(callError, @"Finished with unexpected error: %@", callError);
}
- (void)testClientStreamingRPC {

Loading…
Cancel
Save