diff options
author | Craig Tiller <ctiller@google.com> | 2016-05-31 12:54:23 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-05-31 12:54:23 -0700 |
commit | ccbc810bae7adaa17ad38d03f52d74631ccfe2c3 (patch) | |
tree | 91801af3704b9b255d09b73f47bb76c4b8ce6539 /src/objective-c/tests | |
parent | 77c983dc87dcf19b3e869247f90063ef4c10af3e (diff) | |
parent | 0d6196025e62aea5aabc6341459f2c370e264230 (diff) |
Merge github.com:grpc/grpc into error
Diffstat (limited to 'src/objective-c/tests')
-rw-r--r-- | src/objective-c/tests/InteropTests.m | 16 | ||||
-rw-r--r-- | src/objective-c/tests/Podfile | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 4f096b9efa..781c500f73 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -35,7 +35,9 @@ #include <grpc/status.h> +#import <Cronet/Cronet.h> #import <GRPCClient/GRPCCall+Tests.h> +#import <GRPCClient/GRPCCall+Cronet.h> #import <ProtoRPC/ProtoRPC.h> #import <RemoteTest/Empty.pbobjc.h> #import <RemoteTest/Messages.pbobjc.h> @@ -78,6 +80,8 @@ #pragma mark Tests +static cronet_engine *cronetEngine = NULL; + @implementation InteropTests { RMTTestService *_service; } @@ -88,6 +92,15 @@ - (void)setUp { _service = self.class.host ? [RMTTestService serviceWithHost:self.class.host] : nil; +#ifdef GRPC_COMPILE_WITH_CRONET + if (cronetEngine == NULL) { + // Cronet setup + [Cronet setHttp2Enabled:YES]; + [Cronet start]; + cronetEngine = [Cronet getGlobalEngine]; + [GRPCCall useCronetWithEngine:cronetEngine]; + } +#endif } - (void)testEmptyUnaryRPC { @@ -245,6 +258,8 @@ [self waitForExpectationsWithTimeout:4 handler:nil]; } +#ifndef GRPC_COMPILE_WITH_CRONET +// TODO(makdharma@): Fix this test - (void)testEmptyStreamRPC { XCTAssertNotNil(self.class.host); __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"]; @@ -258,6 +273,7 @@ }]; [self waitForExpectationsWithTimeout:2 handler:nil]; } +#endif - (void)testCancelAfterBeginRPC { XCTAssertNotNil(self.class.host); diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 7ec7a25898..508641d681 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -3,6 +3,7 @@ platform :ios, '8.0' pod 'Protobuf', :path => "../../../third_party/protobuf" pod 'BoringSSL', :podspec => ".." +pod 'CronetFramework', :podspec => ".." pod 'gRPC', :path => "../../.." pod 'RemoteTest', :path => "RemoteTestClient" |