Skip to content
Snippets Groups Projects
Commit 343bea6b authored by murgatroid99's avatar murgatroid99
Browse files

Fixed cancellation tests

parent 1602c5ff
No related branches found
No related tags found
No related merge requests found
......@@ -31,9 +31,12 @@
*
*/
#include <grpc/status.h>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <gRPC/ProtoRPC.h>
#import <gRPC/GRXWriter+Immediate.h>
#import <RemoteTest/Messages.pb.h>
#import <RemoteTest/Test.pb.h>
......@@ -177,11 +180,12 @@
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterBegin"];
ProtoRPC *call = [_service RPCToStreamingInputCallWithRequestsWriter:[GRXWriter writerWithContainer:@[]]
handler:^(RMTStreamingInputCallResponse *response, NSError *error) {
// TODO(mlumish): check for actual CANCELLED error code
XCTAssertEqualObjects(error, nil);
XCTAssertEqual([error code], GRPC_STATUS_CANCELLED);
[expectation fulfill];
}];
[call start];
[call cancel];
[self waitForExpectationsWithTimeout:4 handler:nil];
}
@end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment