Merge pull request #10183 from muxi/backport-10042

Backport 10042: Use the right encoding overhead number in remote interop test with Cronet
pull/10224/head
Muxi Yan 8 years ago committed by GitHub
commit e7aef6c4e4
  1. 9
      src/objective-c/tests/InteropTests.m
  2. 6
      src/objective-c/tests/InteropTestsLocalCleartext.m
  3. 6
      src/objective-c/tests/InteropTestsLocalSSL.m
  4. 6
      src/objective-c/tests/InteropTestsRemote.m
  5. 8
      src/objective-c/tests/InteropTestsRemoteWithCronet/InteropTestsRemoteWithCronet.m

@ -90,6 +90,9 @@
return nil;
}
// This number indicates how many bytes of overhead does Protocol Buffers encoding add onto the
// message. The number varies as different message.proto is used on different servers. The actual
// number for each interop server is overridden in corresponding derived test classes.
- (int32_t)encodingOverhead {
return 0;
}
@ -169,8 +172,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#ifndef GRPC_COMPILE_WITH_CRONET
// TODO (mxyan): Fix this test
- (void)testResponsesOverMaxSizeFailWithActionableMessage {
XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ResponseOverMaxSize"];
@ -191,7 +192,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#endif
- (void)testResponsesOver4MBAreAcceptedIfOptedIn {
XCTAssertNotNil(self.class.host);
@ -327,8 +327,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#ifndef GRPC_COMPILE_WITH_CRONET
// TODO(makdharma@): Fix this test
- (void)testEmptyStreamRPC {
XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"];
@ -342,7 +340,6 @@
}];
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#endif
- (void)testCancelAfterBeginRPC {
XCTAssertNotNil(self.class.host);

@ -37,6 +37,10 @@
static NSString * const kLocalCleartextHost = @"localhost:5050";
// The Protocol Buffers encoding overhead of local interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kLocalInteropServerOverhead = 10;
/** Tests in InteropTests.m, sending the RPCs to a local cleartext server. */
@interface InteropTestsLocalCleartext : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kLocalCleartextHost = @"localhost:5050";
}
- (int32_t)encodingOverhead {
return 10; // bytes
return kLocalInteropServerOverhead; // bytes
}
- (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kLocalSSLHost = @"localhost:5051";
// The Protocol Buffers encoding overhead of local interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kLocalInteropServerOverhead = 10;
/** Tests in InteropTests.m, sending the RPCs to a local SSL server. */
@interface InteropTestsLocalSSL : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
}
- (int32_t)encodingOverhead {
return 10; // bytes
return kLocalInteropServerOverhead; // bytes
}
- (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
// The Protocol Buffers encoding overhead of remote interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kRemoteInteropServerOverhead = 12;
/** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemote : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
}
- (int32_t)encodingOverhead {
return 12; // bytes
return kRemoteInteropServerOverhead; // bytes
}
@end

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
// The Protocol Buffers encoding overhead of remote interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kRemoteInteropServerOverhead = 12;
/** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemoteWithCronet : InteropTests
@end
@ -47,4 +51,8 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
return kRemoteSSLHost;
}
- (int32_t)encodingOverhead {
return kRemoteInteropServerOverhead; // bytes
}
@end

Loading…
Cancel
Save