Use k-contant and add comment for encoding overhead

pull/10183/head
Muxi Yan 8 years ago
parent f69a885f17
commit 10112e50de
  1. 6
      src/objective-c/tests/InteropTestsLocalCleartext.m
  2. 6
      src/objective-c/tests/InteropTestsLocalSSL.m
  3. 6
      src/objective-c/tests/InteropTestsRemote.m
  4. 6
      src/objective-c/tests/InteropTestsRemoteWithCronet/InteropTestsRemoteWithCronet.m

@ -37,6 +37,10 @@
static NSString * const kLocalCleartextHost = @"localhost:5050"; 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. */ /** Tests in InteropTests.m, sending the RPCs to a local cleartext server. */
@interface InteropTestsLocalCleartext : InteropTests @interface InteropTestsLocalCleartext : InteropTests
@end @end
@ -48,7 +52,7 @@ static NSString * const kLocalCleartextHost = @"localhost:5050";
} }
- (int32_t)encodingOverhead { - (int32_t)encodingOverhead {
return 10; // bytes return kLocalInteropServerOverhead; // bytes
} }
- (void)setUp { - (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kLocalSSLHost = @"localhost:5051"; 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. */ /** Tests in InteropTests.m, sending the RPCs to a local SSL server. */
@interface InteropTestsLocalSSL : InteropTests @interface InteropTestsLocalSSL : InteropTests
@end @end
@ -48,7 +52,7 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
} }
- (int32_t)encodingOverhead { - (int32_t)encodingOverhead {
return 10; // bytes return kLocalInteropServerOverhead; // bytes
} }
- (void)setUp { - (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com"; 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. */ /** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemote : InteropTests @interface InteropTestsRemote : InteropTests
@end @end
@ -48,7 +52,7 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
} }
- (int32_t)encodingOverhead { - (int32_t)encodingOverhead {
return 12; // bytes return kRemoteInteropServerOverhead; // bytes
} }
@end @end

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com"; 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. */ /** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemoteWithCronet : InteropTests @interface InteropTestsRemoteWithCronet : InteropTests
@end @end
@ -48,7 +52,7 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
} }
- (int32_t)encodingOverhead { - (int32_t)encodingOverhead {
return 12; // bytes return kRemoteInteropServerOverhead; // bytes
} }
@end @end

Loading…
Cancel
Save