|
|
@ -464,7 +464,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testEmptyUnaryRPC { |
|
|
|
- (void)testEmptyUnaryRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiter, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiter, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"]; |
|
|
|
|
|
|
|
|
|
|
@ -484,12 +484,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
|
|
|
|
|
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
waiter(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiter(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testEmptyUnaryRPCWithV2API { |
|
|
|
- (void)testEmptyUnaryRPCWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectReceive = |
|
|
|
__weak XCTestExpectation *expectReceive = |
|
|
|
[self expectationWithDescription:@"EmptyUnaryWithV2API received message"]; |
|
|
|
[self expectationWithDescription:@"EmptyUnaryWithV2API received message"]; |
|
|
@ -527,13 +527,13 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
}] |
|
|
|
}] |
|
|
|
callOptions:options]; |
|
|
|
callOptions:options]; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
waiterBlock(self, @[ expectReceive, expectComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectReceive, expectComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Test that responses can be dispatched even if we do not run main run-loop |
|
|
|
// Test that responses can be dispatched even if we do not run main run-loop |
|
|
|
- (void)testAsyncDispatchWithV2API { |
|
|
|
- (void)testAsyncDispatchWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
|
|
|
|
|
|
|
|
XCTestExpectation *receiveExpect = [self expectationWithDescription:@"receiveExpect"]; |
|
|
|
XCTestExpectation *receiveExpect = [self expectationWithDescription:@"receiveExpect"]; |
|
|
@ -576,14 +576,14 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
|
|
|
|
|
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ receiveExpect, closeExpect ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ receiveExpect, closeExpect ], GRPCInteropTestTimeoutDefault); |
|
|
|
XCTAssertTrue(messageReceived); |
|
|
|
XCTAssertTrue(messageReceived); |
|
|
|
XCTAssertTrue(done); |
|
|
|
XCTAssertTrue(done); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testLargeUnaryRPC { |
|
|
|
- (void)testLargeUnaryRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
|
|
|
|
|
|
|
@ -609,7 +609,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
|
|
|
|
|
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -619,7 +619,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
|
|
|
|
|
|
|
|
XCTestExpectation *expectComplete = [self expectationWithDescription:@"call complete"]; |
|
|
|
XCTestExpectation *expectComplete = [self expectationWithDescription:@"call complete"]; |
|
|
@ -688,12 +688,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[[service unaryCallWithMessage:request responseHandler:handlerMainQueue |
|
|
|
[[service unaryCallWithMessage:request responseHandler:handlerMainQueue |
|
|
|
callOptions:options] start]; |
|
|
|
callOptions:options] start]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectComplete, expectCompleteMainQueue ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectComplete, expectCompleteMainQueue ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testLargeUnaryRPCWithV2API { |
|
|
|
- (void)testLargeUnaryRPCWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectReceive = |
|
|
|
__weak XCTestExpectation *expectReceive = |
|
|
|
[self expectationWithDescription:@"LargeUnaryWithV2API received message"]; |
|
|
|
[self expectationWithDescription:@"LargeUnaryWithV2API received message"]; |
|
|
@ -741,12 +741,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
}] |
|
|
|
}] |
|
|
|
callOptions:options]; |
|
|
|
callOptions:options]; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
waiterBlock(self, @[ expectReceive, expectComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectReceive, expectComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testConcurrentRPCsWithErrorsWithV2API { |
|
|
|
- (void)testConcurrentRPCsWithErrorsWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
NSMutableArray *completeExpectations = [NSMutableArray array]; |
|
|
|
NSMutableArray *completeExpectations = [NSMutableArray array]; |
|
|
|
NSMutableArray *calls = [NSMutableArray array]; |
|
|
|
NSMutableArray *calls = [NSMutableArray array]; |
|
|
@ -805,7 +805,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, completeExpectations, GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(completeExpectations, GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -862,7 +862,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testPacketCoalescing { |
|
|
|
- (void)testPacketCoalescing { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
|
|
|
|
|
|
|
@ -901,13 +901,13 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
[GRPCCall enableOpBatchLog:NO]; |
|
|
|
[GRPCCall enableOpBatchLog:NO]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)test4MBResponsesAreAccepted { |
|
|
|
- (void)test4MBResponsesAreAccepted { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"MaxResponseSize"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"MaxResponseSize"]; |
|
|
|
|
|
|
|
|
|
|
@ -927,12 +927,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testResponsesOverMaxSizeFailWithActionableMessage { |
|
|
|
- (void)testResponsesOverMaxSizeFailWithActionableMessage { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"ResponseOverMaxSize"]; |
|
|
|
[self expectationWithDescription:@"ResponseOverMaxSize"]; |
|
|
@ -961,12 +961,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
@"Received message larger than max (4194305 vs. 4194304)"); |
|
|
|
@"Received message larger than max (4194305 vs. 4194304)"); |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testResponsesOver4MBAreAcceptedIfOptedIn { |
|
|
|
- (void)testResponsesOver4MBAreAcceptedIfOptedIn { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"HigherResponseSizeLimit"]; |
|
|
|
[self expectationWithDescription:@"HigherResponseSizeLimit"]; |
|
|
@ -987,13 +987,13 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
XCTAssertNil(callError, @"Finished with unexpected error: %@", callError); |
|
|
|
XCTAssertNil(callError, @"Finished with unexpected error: %@", callError); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testClientStreamingRPC { |
|
|
|
- (void)testClientStreamingRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ClientStreaming"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ClientStreaming"]; |
|
|
|
|
|
|
|
|
|
|
@ -1030,12 +1030,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testServerStreamingRPC { |
|
|
|
- (void)testServerStreamingRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ServerStreaming"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ServerStreaming"]; |
|
|
|
|
|
|
|
|
|
|
@ -1088,12 +1088,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testPingPongRPC { |
|
|
|
- (void)testPingPongRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPong"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPong"]; |
|
|
|
|
|
|
|
|
|
|
@ -1155,12 +1155,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
} |
|
|
|
} |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testPingPongRPCWithV2API { |
|
|
|
- (void)testPingPongRPCWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPongWithV2API"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPongWithV2API"]; |
|
|
|
|
|
|
|
|
|
|
@ -1221,12 +1221,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testPingPongRPCWithFlowControl { |
|
|
|
- (void)testPingPongRPCWithFlowControl { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPongWithV2API"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPongWithV2API"]; |
|
|
|
|
|
|
|
|
|
|
@ -1296,7 +1296,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
assertBlock( |
|
|
|
assertBlock( |
|
|
|
writeMessageCount == 4, |
|
|
|
writeMessageCount == 4, |
|
|
|
[NSString stringWithFormat:@"writeMessageCount %@ not equal to 4", @(writeMessageCount)]); |
|
|
|
[NSString stringWithFormat:@"writeMessageCount %@ not equal to 4", @(writeMessageCount)]); |
|
|
@ -1304,7 +1304,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testEmptyStreamRPC { |
|
|
|
- (void)testEmptyStreamRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"]; |
|
|
|
__weak RMTTestService *weakService = service; |
|
|
|
__weak RMTTestService *weakService = service; |
|
|
@ -1319,12 +1319,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
XCTAssert(done, @"Unexpected response: %@", response); |
|
|
|
XCTAssert(done, @"Unexpected response: %@", response); |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testCancelAfterBeginRPC { |
|
|
|
- (void)testCancelAfterBeginRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterBegin"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterBegin"]; |
|
|
|
|
|
|
|
|
|
|
@ -1350,12 +1350,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call cancel]; |
|
|
|
[call cancel]; |
|
|
|
XCTAssertEqual(call.state, GRXWriterStateFinished); |
|
|
|
XCTAssertEqual(call.state, GRXWriterStateFinished); |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testCancelAfterBeginRPCWithV2API { |
|
|
|
- (void)testCancelAfterBeginRPCWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"CancelAfterBeginWithV2API"]; |
|
|
|
[self expectationWithDescription:@"CancelAfterBeginWithV2API"]; |
|
|
@ -1384,12 +1384,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call cancel]; |
|
|
|
[call cancel]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testCancelAfterFirstResponseRPC { |
|
|
|
- (void)testCancelAfterFirstResponseRPC { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"CancelAfterFirstResponse"]; |
|
|
|
[self expectationWithDescription:@"CancelAfterFirstResponse"]; |
|
|
@ -1426,12 +1426,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testCancelAfterFirstResponseRPCWithV2API { |
|
|
|
- (void)testCancelAfterFirstResponseRPCWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *completionExpectation = |
|
|
|
__weak XCTestExpectation *completionExpectation = |
|
|
|
[self expectationWithDescription:@"Call completed."]; |
|
|
|
[self expectationWithDescription:@"Call completed."]; |
|
|
@ -1476,13 +1476,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
weakCall = call; |
|
|
|
weakCall = call; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
waiterBlock(self, @[ completionExpectation, responseExpectation ], |
|
|
|
waiterBlock(@[ completionExpectation, responseExpectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
GRPCInteropTestTimeoutDefault); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testCancelAfterFirstRequestWithV2API { |
|
|
|
- (void)testCancelAfterFirstRequestWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *completionExpectation = |
|
|
|
__weak XCTestExpectation *completionExpectation = |
|
|
|
[self expectationWithDescription:@"Call completed."]; |
|
|
|
[self expectationWithDescription:@"Call completed."]; |
|
|
@ -1519,12 +1518,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call cancel]; |
|
|
|
[call cancel]; |
|
|
|
waiterBlock(self, @[ completionExpectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ completionExpectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testRPCAfterClosingOpenConnections { |
|
|
|
- (void)testRPCAfterClosingOpenConnections { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"RPC after closing connection"]; |
|
|
|
[self expectationWithDescription:@"RPC after closing connection"]; |
|
|
@ -1556,7 +1555,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1567,7 +1566,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"]; |
|
|
|
|
|
|
|
|
|
|
@ -1596,12 +1595,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[expectation fulfill]; |
|
|
|
[expectation fulfill]; |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testKeepaliveWithV2API { |
|
|
|
- (void)testKeepaliveWithV2API { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
if ([[self class] transport] == gGRPCCoreCronetID) { |
|
|
|
if ([[self class] transport] == gGRPCCoreCronetID) { |
|
|
|
// Cronet does not support keepalive |
|
|
|
// Cronet does not support keepalive |
|
|
@ -1644,13 +1643,13 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], kTestTimeout); |
|
|
|
waiterBlock(@[ expectation ], kTestTimeout); |
|
|
|
[call finish]; |
|
|
|
[call finish]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testDefaultInterceptor { |
|
|
|
- (void)testDefaultInterceptor { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"testDefaultInterceptor"]; |
|
|
|
[self expectationWithDescription:@"testDefaultInterceptor"]; |
|
|
@ -1717,12 +1716,12 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testLoggingInterceptor { |
|
|
|
- (void)testLoggingInterceptor { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"testLoggingInterceptor"]; |
|
|
|
[self expectationWithDescription:@"testLoggingInterceptor"]; |
|
|
@ -1843,7 +1842,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
|
|
|
|
|
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
@ -1862,7 +1861,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
// Chain a default interceptor and a hook interceptor which, after one write, cancels the call |
|
|
|
// Chain a default interceptor and a hook interceptor which, after one write, cancels the call |
|
|
|
// under the hood but forward further data to the user. |
|
|
|
// under the hood but forward further data to the user. |
|
|
|
- (void)testHijackingInterceptor { |
|
|
|
- (void)testHijackingInterceptor { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
NSUInteger kCancelAfterWrites = 1; |
|
|
|
NSUInteger kCancelAfterWrites = 1; |
|
|
|
__weak XCTestExpectation *expectUserCallComplete = |
|
|
|
__weak XCTestExpectation *expectUserCallComplete = |
|
|
@ -1990,7 +1989,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectUserCallComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectUserCallComplete ], GRPCInteropTestTimeoutDefault); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(finishCount == 1, [NSString stringWithFormat:@"%@", @(finishCount)]); |
|
|
|
assertBlock(finishCount == 1, [NSString stringWithFormat:@"%@", @(finishCount)]); |
|
|
@ -2002,7 +2001,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testGlobalInterceptor { |
|
|
|
- (void)testGlobalInterceptor { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"testGlobalInterceptor"]; |
|
|
|
[self expectationWithDescription:@"testGlobalInterceptor"]; |
|
|
@ -2112,7 +2111,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call start]; |
|
|
|
[call start]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
|
|
|
|
|
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
@ -2149,7 +2148,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- (void)testInterceptorAndGlobalInterceptor { |
|
|
|
- (void)testInterceptorAndGlobalInterceptor { |
|
|
|
GRPCTestRunWithFlakeRepeats(^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
GRPCTestRunWithFlakeRepeats(self, ^(GRPCTestWaiter waiterBlock, GRPCTestAssert assertBlock) { |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
RMTTestService *service = [RMTTestService serviceWithHost:[[self class] host]]; |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
__weak XCTestExpectation *expectation = |
|
|
|
[self expectationWithDescription:@"testInterceptorAndGlobalInterceptor"]; |
|
|
|
[self expectationWithDescription:@"testInterceptorAndGlobalInterceptor"]; |
|
|
@ -2309,7 +2308,7 @@ static dispatch_once_t initGlobalInterceptorFactory; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call receiveNextMessage]; |
|
|
|
[call writeMessage:request]; |
|
|
|
[call writeMessage:request]; |
|
|
|
|
|
|
|
|
|
|
|
waiterBlock(self, @[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
waiterBlock(@[ expectation ], GRPCInteropTestTimeoutDefault); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(startCount == 1, [NSString stringWithFormat:@"%@", @(startCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(writeDataCount == 4, [NSString stringWithFormat:@"%@", @(writeDataCount)]); |
|
|
|
assertBlock(finishCount == 1, [NSString stringWithFormat:@"%@", @(finishCount)]); |
|
|
|
assertBlock(finishCount == 1, [NSString stringWithFormat:@"%@", @(finishCount)]); |
|
|
|