aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-12-13 11:21:45 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-12-13 11:21:45 -0800
commit48ac4ee48a56582c86f2ada6d3281e37590c57c4 (patch)
tree4dfdacec9787438b379da4eb755db743b83c929d /src/objective-c
parent827e84d0a4165e3e64d9ae0a1b8fbbaecdde0fa6 (diff)
Test assert failure
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/tests/InteropTests.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m
index 3665e9705d..656af18888 100644
--- a/src/objective-c/tests/InteropTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -197,7 +197,8 @@ BOOL isRemoteInteropTest(NSString *host) {
- (void)testEmptyUnaryRPCWithV2API {
XCTAssertNotNil([[self class] host]);
- __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnaryWithV2API"];
+ __weak XCTestExpectation *expectReceive = [self expectationWithDescription:@"EmptyUnaryWithV2API received message"];
+ __weak XCTestExpectation *expectComplete = [self expectationWithDescription:@"EmptyUnaryWithV2API completed"];
GPBEmpty *request = [GPBEmpty message];
GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init];
@@ -212,11 +213,12 @@ BOOL isRemoteInteropTest(NSString *host) {
if (message) {
id expectedResponse = [GPBEmpty message];
XCTAssertEqualObjects(message, expectedResponse);
- [expectation fulfill];
+ [expectReceive fulfill];
}
}
closeCallback:^(NSDictionary *trailingMetadata, NSError *error) {
XCTAssertNil(error, @"Unexpected error: %@", error);
+ [expectComplete fulfill];
}]
callOptions:options];
[call start];
@@ -249,9 +251,9 @@ BOOL isRemoteInteropTest(NSString *host) {
- (void)testLargeUnaryRPCWithV2API {
XCTAssertNotNil([[self class] host]);
- __weak XCTestExpectation *expectRecvMessage =
+ __weak XCTestExpectation *expectReceive =
[self expectationWithDescription:@"LargeUnaryWithV2API received message"];
- __weak XCTestExpectation *expectRecvComplete =
+ __weak XCTestExpectation *expectComplete =
[self expectationWithDescription:@"LargeUnaryWithV2API received complete"];
RMTSimpleRequest *request = [RMTSimpleRequest message];
@@ -277,12 +279,12 @@ BOOL isRemoteInteropTest(NSString *host) {
[NSMutableData dataWithLength:314159];
XCTAssertEqualObjects(message, expectedResponse);
- [expectRecvMessage fulfill];
+ [expectReceive fulfill];
}
}
closeCallback:^(NSDictionary *trailingMetadata, NSError *error) {
XCTAssertNil(error, @"Unexpected error: %@", error);
- [expectRecvComplete fulfill];
+ [expectComplete fulfill];
}]
callOptions:options];
[call start];