diff options
Diffstat (limited to 'src/objective-c/tests/InteropTests.m')
-rw-r--r-- | src/objective-c/tests/InteropTests.m | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 501f33317a..1b63fe2059 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -31,11 +31,11 @@ * */ -#include <grpc/status.h> +#import "InteropTests.h" -#import <UIKit/UIKit.h> -#import <XCTest/XCTest.h> +#include <grpc/status.h> +#import <GRPCClient/GRPCCall+Tests.h> #import <ProtoRPC/ProtoRPC.h> #import <RemoteTest/Empty.pbobjc.h> #import <RemoteTest/Messages.pbobjc.h> @@ -76,18 +76,21 @@ } @end -@interface InteropTests : XCTestCase -@end +#pragma mark Tests + +static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.google.com"; @implementation InteropTests { RMTTestService *_service; } -- (void)setUp { - _service = [[RMTTestService alloc] initWithHost:@"grpc-test.sandbox.google.com"]; ++ (NSString *)host { + return kRemoteSSLHost; } -// Tests as described here: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md +- (void)setUp { + _service = [[RMTTestService alloc] initWithHost:self.class.host]; +} - (void)testEmptyUnaryRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"]; @@ -125,7 +128,7 @@ [expectation fulfill]; }]; - [self waitForExpectationsWithTimeout:8 handler:nil]; + [self waitForExpectationsWithTimeout:16 handler:nil]; } - (void)testClientStreamingRPC { |