[gRPC/ObjC] Fix flaky test InteropTests::testHijackingInterceptor (#27116)

pull/27157/head
Denny C. Dai 4 years ago committed by GitHub
parent 764232fa13
commit cef46fe7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/objective-c/tests/InteropTests/InteropTests.m

@ -1603,6 +1603,8 @@ static dispatch_once_t initGlobalInterceptorFactory;
XCTAssertNotNil([[self class] host]);
__weak XCTestExpectation *expectUserCallComplete =
[self expectationWithDescription:@"User call completed."];
__weak XCTestExpectation *expectResponseCallbackComplete =
[self expectationWithDescription:@"Hook interceptor response callback completed"];
NSArray *responses = @[ @1, @2, @3, @4 ];
__block int index = 0;
@ -1659,6 +1661,7 @@ static dispatch_once_t initGlobalInterceptorFactory;
XCTAssertNil(trailingMetadata);
XCTAssertNotNil(error);
XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED);
[expectResponseCallbackComplete fulfill];
}
didWriteDataHook:nil];

Loading…
Cancel
Save