|
|
|
@ -35,6 +35,7 @@ |
|
|
|
|
|
|
|
|
|
#include <grpc/status.h> |
|
|
|
|
|
|
|
|
|
#import <GRPCClient/GRPCCall+ChannelArg.h> |
|
|
|
|
#import <GRPCClient/GRPCCall+Tests.h> |
|
|
|
|
#import <ProtoRPC/ProtoRPC.h> |
|
|
|
|
#import <RemoteTest/Empty.pbobjc.h> |
|
|
|
@ -312,4 +313,25 @@ |
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testRPCAfterClosingOpenConnections { |
|
|
|
|
XCTAssertNotNil(self.class.host); |
|
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
|
[self expectationWithDescription:@"RPC after closing connection"]; |
|
|
|
|
|
|
|
|
|
RMTEmpty *request = [RMTEmpty message]; |
|
|
|
|
|
|
|
|
|
[_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { |
|
|
|
|
XCTAssertNil(error, @"First RPC finished with unexpected error: %@", error); |
|
|
|
|
|
|
|
|
|
[GRPCCall closeOpenConnections]; |
|
|
|
|
|
|
|
|
|
[_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { |
|
|
|
|
XCTAssertNil(error, @"Second RPC finished with unexpected error: %@", error); |
|
|
|
|
[expectation fulfill]; |
|
|
|
|
}]; |
|
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:4 handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@end |
|
|
|
|