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