|
|
|
@ -43,6 +43,8 @@ |
|
|
|
|
#import <RxLibrary/GRXWriteable.h> |
|
|
|
|
#import <RxLibrary/GRXWriter+Immediate.h> |
|
|
|
|
|
|
|
|
|
#define TEST_TIMEOUT 16 |
|
|
|
|
|
|
|
|
|
static NSString * const kHostAddress = @"localhost:5050"; |
|
|
|
|
static NSString * const kPackage = @"grpc.testing"; |
|
|
|
|
static NSString * const kService = @"TestService"; |
|
|
|
@ -137,7 +139,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:4 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testEmptyRPC { |
|
|
|
@ -159,7 +161,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testSimpleProtoRPC { |
|
|
|
@ -191,7 +193,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testMetadata { |
|
|
|
@ -225,7 +227,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:4 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testResponseMetadataKVO { |
|
|
|
@ -256,7 +258,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
- (void)testUserAgentPrefix { |
|
|
|
@ -287,7 +289,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO(makarandd): Move to a different file that contains only unit tests |
|
|
|
@ -347,7 +349,7 @@ static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
[call startWithWriteable:responsesWriteable]; |
|
|
|
|
|
|
|
|
|
[self waitForExpectationsWithTimeout:8 handler:nil]; |
|
|
|
|
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@end |
|
|
|
|