Skip to content

Commit

Permalink
[gRPC/ObjC] Fix flaky test InteropTests::testHijackingInterceptor (gr…
Browse files Browse the repository at this point in the history
  • Loading branch information
dennycd authored Aug 26, 2021
1 parent 764232f commit cef46fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/objective-c/tests/InteropTests/InteropTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,8 @@ - (void)testHijackingInterceptor {
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;
Expand Down Expand Up @@ -1659,6 +1661,7 @@ - (void)testHijackingInterceptor {
XCTAssertNil(trailingMetadata);
XCTAssertNotNil(error);
XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED);
[expectResponseCallbackComplete fulfill];
}
didWriteDataHook:nil];

Expand Down

0 comments on commit cef46fe

Please sign in to comment.