Merge pull request #6613 from jtattermusch/protobuf3beta3

Update third_party/protobuf to v3.0.0-beta3 (in  release-0_14  branch)
pull/6621/head
Jan Tattermusch 9 years ago
commit 312040d5c7
  1. 2
      src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
  2. 2
      src/csharp/Grpc.Examples.Tests/packages.config
  3. 2
      src/csharp/Grpc.Examples/Grpc.Examples.csproj
  4. 12
      src/csharp/Grpc.Examples/Math.cs
  5. 2
      src/csharp/Grpc.Examples/packages.config
  6. 2
      src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
  7. 7
      src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
  8. 31
      src/csharp/Grpc.HealthCheck.Tests/HealthServiceImplTest.cs
  9. 2
      src/csharp/Grpc.HealthCheck.Tests/packages.config
  10. 2
      src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj
  11. 24
      src/csharp/Grpc.HealthCheck/Health.cs
  12. 2
      src/csharp/Grpc.HealthCheck/packages.config
  13. 14
      src/csharp/Grpc.IntegrationTesting/ClientRunners.cs
  14. 94
      src/csharp/Grpc.IntegrationTesting/Control.cs
  15. 4
      src/csharp/Grpc.IntegrationTesting/Empty.cs
  16. 2
      src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
  17. 40
      src/csharp/Grpc.IntegrationTesting/InteropClient.cs
  18. 94
      src/csharp/Grpc.IntegrationTesting/Messages.cs
  19. 14
      src/csharp/Grpc.IntegrationTesting/Metrics.cs
  20. 10
      src/csharp/Grpc.IntegrationTesting/Payloads.cs
  21. 4
      src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs
  22. 4
      src/csharp/Grpc.IntegrationTesting/ServerRunners.cs
  23. 2
      src/csharp/Grpc.IntegrationTesting/Services.cs
  24. 10
      src/csharp/Grpc.IntegrationTesting/Stats.cs
  25. 2
      src/csharp/Grpc.IntegrationTesting/Test.cs
  26. 2
      src/csharp/Grpc.IntegrationTesting/packages.config
  27. 2
      src/csharp/build_packages.bat
  28. 2
      templates/src/csharp/build_packages.bat.template
  29. 2
      third_party/protobuf
  30. 2
      tools/run_tests/sanity/check_submodules.sh

@ -37,7 +37,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="Google.Protobuf"> <Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" /> <package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" /> <package id="NUnitLite" version="3.2.0" targetFramework="net45" />

@ -39,7 +39,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>

@ -34,12 +34,12 @@ namespace Math {
"Mw==")); "Mw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Math.DivArgs), global::Math.DivArgs.Parser, new[]{ "Dividend", "Divisor" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Math.DivArgs), global::Math.DivArgs.Parser, new[]{ "Dividend", "Divisor" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Math.DivReply), global::Math.DivReply.Parser, new[]{ "Quotient", "Remainder" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Math.DivReply), global::Math.DivReply.Parser, new[]{ "Quotient", "Remainder" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Math.FibArgs), global::Math.FibArgs.Parser, new[]{ "Limit" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Math.FibArgs), global::Math.FibArgs.Parser, new[]{ "Limit" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Math.Num), global::Math.Num.Parser, new[]{ "Num_" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Math.Num), global::Math.Num.Parser, new[]{ "Num_" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Math.FibReply), global::Math.FibReply.Parser, new[]{ "Count" }, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Math.FibReply), global::Math.FibReply.Parser, new[]{ "Count" }, null, null, null)
})); }));
} }
#endregion #endregion

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" /> <package id="NUnit" version="3.2.0" targetFramework="net45" />
</packages> </packages>

@ -45,7 +45,7 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Google.Protobuf"> <Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework"> <Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>

@ -79,16 +79,17 @@ namespace Grpc.HealthCheck.Tests
[Test] [Test]
public void ServiceIsRunning() public void ServiceIsRunning()
{ {
serviceImpl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING); serviceImpl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Serving);
var response = client.Check(new HealthCheckRequest { Service = "" }); var response = client.Check(new HealthCheckRequest { Service = "" });
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, response.Status); Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Serving, response.Status);
} }
[Test] [Test]
public void ServiceDoesntExist() public void ServiceDoesntExist()
{ {
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => client.Check(new HealthCheckRequest { Service = "nonexistent.service" })); var ex = Assert.Throws<RpcException>(() => client.Check(new HealthCheckRequest { Service = "nonexistent.service" }));
Assert.AreEqual(StatusCode.NotFound, ex.Status.StatusCode);
} }
// TODO(jtattermusch): add test with timeout once timeouts are supported // TODO(jtattermusch): add test with timeout once timeouts are supported

@ -50,38 +50,39 @@ namespace Grpc.HealthCheck.Tests
public void SetStatus() public void SetStatus()
{ {
var impl = new HealthServiceImpl(); var impl = new HealthServiceImpl();
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING); impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Serving);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, "")); Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Serving, GetStatusHelper(impl, ""));
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.NOT_SERVING); impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.NotServing);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.NOT_SERVING, GetStatusHelper(impl, "")); Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.NotServing, GetStatusHelper(impl, ""));
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.UNKNOWN); impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Unknown);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, "")); Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Unknown, GetStatusHelper(impl, ""));
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.SERVING); impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.Serving);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, "grpc.test.TestService")); Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Serving, GetStatusHelper(impl, "grpc.test.TestService"));
} }
[Test] [Test]
public void ClearStatus() public void ClearStatus()
{ {
var impl = new HealthServiceImpl(); var impl = new HealthServiceImpl();
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING); impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Serving);
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.UNKNOWN); impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.Unknown);
impl.ClearStatus(""); impl.ClearStatus("");
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => GetStatusHelper(impl, "")); var ex = Assert.Throws<RpcException>(() => GetStatusHelper(impl, ""));
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, "grpc.test.TestService")); Assert.AreEqual(StatusCode.NotFound, ex.Status.StatusCode);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.Unknown, GetStatusHelper(impl, "grpc.test.TestService"));
} }
[Test] [Test]
public void ClearAll() public void ClearAll()
{ {
var impl = new HealthServiceImpl(); var impl = new HealthServiceImpl();
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING); impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.Serving);
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.UNKNOWN); impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.Unknown);
impl.ClearAll(); impl.ClearAll();
Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "")); Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, ""));
@ -92,7 +93,7 @@ namespace Grpc.HealthCheck.Tests
public void NullsRejected() public void NullsRejected()
{ {
var impl = new HealthServiceImpl(); var impl = new HealthServiceImpl();
Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus(null, HealthCheckResponse.Types.ServingStatus.SERVING)); Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus(null, HealthCheckResponse.Types.ServingStatus.Serving));
Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus(null)); Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus(null));
} }

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" /> <package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" /> <package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages> </packages>

@ -40,7 +40,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

@ -33,9 +33,9 @@ namespace Grpc.Health.V1 {
"Ag5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z")); "Ag5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheckRequest), global::Grpc.Health.V1.HealthCheckRequest.Parser, new[]{ "Service" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Health.V1.HealthCheckRequest), global::Grpc.Health.V1.HealthCheckRequest.Parser, new[]{ "Service" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheckResponse), global::Grpc.Health.V1.HealthCheckResponse.Parser, new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus) }, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Health.V1.HealthCheckResponse), global::Grpc.Health.V1.HealthCheckResponse.Parser, new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus) }, null)
})); }));
} }
#endregion #endregion
@ -75,7 +75,7 @@ namespace Grpc.Health.V1 {
public string Service { public string Service {
get { return service_; } get { return service_; }
set { set {
service_ = pb::Preconditions.CheckNotNull(value, "value"); service_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -174,7 +174,7 @@ namespace Grpc.Health.V1 {
/// <summary>Field number for the "status" field.</summary> /// <summary>Field number for the "status" field.</summary>
public const int StatusFieldNumber = 1; public const int StatusFieldNumber = 1;
private global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus status_ = global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN; private global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus status_ = 0;
public global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus Status { public global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus Status {
get { return status_; } get { return status_; }
set { set {
@ -199,7 +199,7 @@ namespace Grpc.Health.V1 {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) hash ^= Status.GetHashCode(); if (Status != 0) hash ^= Status.GetHashCode();
return hash; return hash;
} }
@ -208,7 +208,7 @@ namespace Grpc.Health.V1 {
} }
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) { if (Status != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
output.WriteEnum((int) Status); output.WriteEnum((int) Status);
} }
@ -216,7 +216,7 @@ namespace Grpc.Health.V1 {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) { if (Status != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
} }
return size; return size;
@ -226,7 +226,7 @@ namespace Grpc.Health.V1 {
if (other == null) { if (other == null) {
return; return;
} }
if (other.Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) { if (other.Status != 0) {
Status = other.Status; Status = other.Status;
} }
} }
@ -251,9 +251,9 @@ namespace Grpc.Health.V1 {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Types { public static partial class Types {
public enum ServingStatus { public enum ServingStatus {
UNKNOWN = 0, [pbr::OriginalName("UNKNOWN")] Unknown = 0,
SERVING = 1, [pbr::OriginalName("SERVING")] Serving = 1,
NOT_SERVING = 2, [pbr::OriginalName("NOT_SERVING")] NotServing = 2,
} }
} }

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> </packages>

@ -273,8 +273,8 @@ namespace Grpc.IntegrationTesting
{ {
if (payloadConfig.PayloadCase == PayloadConfig.PayloadOneofCase.BytebufParams) if (payloadConfig.PayloadCase == PayloadConfig.PayloadOneofCase.BytebufParams)
{ {
GrpcPreconditions.CheckArgument(clientType == ClientType.ASYNC_CLIENT, "Generic client only supports async API"); GrpcPreconditions.CheckArgument(clientType == ClientType.AsyncClient, "Generic client only supports async API");
GrpcPreconditions.CheckArgument(rpcType == RpcType.STREAMING, "Generic client only supports streaming calls"); GrpcPreconditions.CheckArgument(rpcType == RpcType.Streaming, "Generic client only supports streaming calls");
return () => return () =>
{ {
RunGenericStreamingAsync(channel, timer).Wait(); RunGenericStreamingAsync(channel, timer).Wait();
@ -282,21 +282,21 @@ namespace Grpc.IntegrationTesting
} }
GrpcPreconditions.CheckNotNull(payloadConfig.SimpleParams); GrpcPreconditions.CheckNotNull(payloadConfig.SimpleParams);
if (clientType == ClientType.SYNC_CLIENT) if (clientType == ClientType.SyncClient)
{ {
GrpcPreconditions.CheckArgument(rpcType == RpcType.UNARY, "Sync client can only be used for Unary calls in C#"); GrpcPreconditions.CheckArgument(rpcType == RpcType.Unary, "Sync client can only be used for Unary calls in C#");
return () => RunUnary(channel, timer); return () => RunUnary(channel, timer);
} }
else if (clientType == ClientType.ASYNC_CLIENT) else if (clientType == ClientType.AsyncClient)
{ {
switch (rpcType) switch (rpcType)
{ {
case RpcType.UNARY: case RpcType.Unary:
return () => return () =>
{ {
RunUnaryAsync(channel, timer).Wait(); RunUnaryAsync(channel, timer).Wait();
}; };
case RpcType.STREAMING: case RpcType.Streaming:
return () => return () =>
{ {
RunStreamingPingPongAsync(channel, timer).Wait(); RunStreamingPingPongAsync(channel, timer).Wait();

@ -85,25 +85,25 @@ namespace Grpc.Testing {
"RUFNSU5HEAFiBnByb3RvMw==")); "RUFNSU5HEAFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, }, new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson" }, new[]{ "Load" }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson" }, new[]{ "Load" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams", "CoreList", "CoreLimit", "OtherClientApi" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams", "CoreList", "CoreLimit", "OtherClientApi" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Mark), global::Grpc.Testing.Mark.Parser, new[]{ "Reset" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Mark), global::Grpc.Testing.Mark.Parser, new[]{ "Reset" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientArgs), global::Grpc.Testing.ClientArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientArgs), global::Grpc.Testing.ClientArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig", "CoreList", "OtherServerApi" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig", "CoreList", "OtherServerApi" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerArgs), global::Grpc.Testing.ServerArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerArgs), global::Grpc.Testing.ServerArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreResponse), global::Grpc.Testing.CoreResponse.Parser, new[]{ "Cores" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.CoreResponse), global::Grpc.Testing.CoreResponse.Parser, new[]{ "Cores" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenario), global::Grpc.Testing.Scenario.Parser, new[]{ "Name", "ClientConfig", "NumClients", "ServerConfig", "NumServers", "WarmupSeconds", "BenchmarkSeconds", "SpawnLocalWorkerCount" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Scenario), global::Grpc.Testing.Scenario.Parser, new[]{ "Name", "ClientConfig", "NumClients", "ServerConfig", "NumServers", "WarmupSeconds", "BenchmarkSeconds", "SpawnLocalWorkerCount" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenarios), global::Grpc.Testing.Scenarios.Parser, new[]{ "Scenarios_" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Scenarios), global::Grpc.Testing.Scenarios.Parser, new[]{ "Scenarios_" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResultSummary), global::Grpc.Testing.ScenarioResultSummary.Parser, new[]{ "Qps", "QpsPerServerCore", "ServerSystemTime", "ServerUserTime", "ClientSystemTime", "ClientUserTime", "Latency50", "Latency90", "Latency95", "Latency99", "Latency999" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ScenarioResultSummary), global::Grpc.Testing.ScenarioResultSummary.Parser, new[]{ "Qps", "QpsPerServerCore", "ServerSystemTime", "ServerUserTime", "ClientSystemTime", "ClientUserTime", "Latency50", "Latency90", "Latency95", "Latency99", "Latency999" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResult), global::Grpc.Testing.ScenarioResult.Parser, new[]{ "Scenario", "Latencies", "ClientStats", "ServerStats", "ServerCores", "Summary" }, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ScenarioResult), global::Grpc.Testing.ScenarioResult.Parser, new[]{ "Scenario", "Latencies", "ClientStats", "ServerStats", "ServerCores", "Summary" }, null, null, null)
})); }));
} }
#endregion #endregion
@ -115,27 +115,27 @@ namespace Grpc.Testing {
/// Many languages support a basic distinction between using /// Many languages support a basic distinction between using
/// sync or async client, and this allows the specification /// sync or async client, and this allows the specification
/// </summary> /// </summary>
SYNC_CLIENT = 0, [pbr::OriginalName("SYNC_CLIENT")] SyncClient = 0,
ASYNC_CLIENT = 1, [pbr::OriginalName("ASYNC_CLIENT")] AsyncClient = 1,
/// <summary> /// <summary>
/// used for some language-specific variants /// used for some language-specific variants
/// </summary> /// </summary>
OTHER_CLIENT = 2, [pbr::OriginalName("OTHER_CLIENT")] OtherClient = 2,
} }
public enum ServerType { public enum ServerType {
SYNC_SERVER = 0, [pbr::OriginalName("SYNC_SERVER")] SyncServer = 0,
ASYNC_SERVER = 1, [pbr::OriginalName("ASYNC_SERVER")] AsyncServer = 1,
ASYNC_GENERIC_SERVER = 2, [pbr::OriginalName("ASYNC_GENERIC_SERVER")] AsyncGenericServer = 2,
/// <summary> /// <summary>
/// used for some language-specific variants /// used for some language-specific variants
/// </summary> /// </summary>
OTHER_SERVER = 3, [pbr::OriginalName("OTHER_SERVER")] OtherServer = 3,
} }
public enum RpcType { public enum RpcType {
UNARY = 0, [pbr::OriginalName("UNARY")] Unary = 0,
STREAMING = 1, [pbr::OriginalName("STREAMING")] Streaming = 1,
} }
#endregion #endregion
@ -547,7 +547,7 @@ namespace Grpc.Testing {
public string ServerHostOverride { public string ServerHostOverride {
get { return serverHostOverride_; } get { return serverHostOverride_; }
set { set {
serverHostOverride_ = pb::Preconditions.CheckNotNull(value, "value"); serverHostOverride_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -686,7 +686,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "client_type" field.</summary> /// <summary>Field number for the "client_type" field.</summary>
public const int ClientTypeFieldNumber = 2; public const int ClientTypeFieldNumber = 2;
private global::Grpc.Testing.ClientType clientType_ = global::Grpc.Testing.ClientType.SYNC_CLIENT; private global::Grpc.Testing.ClientType clientType_ = 0;
public global::Grpc.Testing.ClientType ClientType { public global::Grpc.Testing.ClientType ClientType {
get { return clientType_; } get { return clientType_; }
set { set {
@ -747,7 +747,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "rpc_type" field.</summary> /// <summary>Field number for the "rpc_type" field.</summary>
public const int RpcTypeFieldNumber = 8; public const int RpcTypeFieldNumber = 8;
private global::Grpc.Testing.RpcType rpcType_ = global::Grpc.Testing.RpcType.UNARY; private global::Grpc.Testing.RpcType rpcType_ = 0;
public global::Grpc.Testing.RpcType RpcType { public global::Grpc.Testing.RpcType RpcType {
get { return rpcType_; } get { return rpcType_; }
set { set {
@ -819,7 +819,7 @@ namespace Grpc.Testing {
public string OtherClientApi { public string OtherClientApi {
get { return otherClientApi_; } get { return otherClientApi_; }
set { set {
otherClientApi_ = pb::Preconditions.CheckNotNull(value, "value"); otherClientApi_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -853,12 +853,12 @@ namespace Grpc.Testing {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
hash ^= serverTargets_.GetHashCode(); hash ^= serverTargets_.GetHashCode();
if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) hash ^= ClientType.GetHashCode(); if (ClientType != 0) hash ^= ClientType.GetHashCode();
if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); if (securityParams_ != null) hash ^= SecurityParams.GetHashCode();
if (OutstandingRpcsPerChannel != 0) hash ^= OutstandingRpcsPerChannel.GetHashCode(); if (OutstandingRpcsPerChannel != 0) hash ^= OutstandingRpcsPerChannel.GetHashCode();
if (ClientChannels != 0) hash ^= ClientChannels.GetHashCode(); if (ClientChannels != 0) hash ^= ClientChannels.GetHashCode();
if (AsyncClientThreads != 0) hash ^= AsyncClientThreads.GetHashCode(); if (AsyncClientThreads != 0) hash ^= AsyncClientThreads.GetHashCode();
if (RpcType != global::Grpc.Testing.RpcType.UNARY) hash ^= RpcType.GetHashCode(); if (RpcType != 0) hash ^= RpcType.GetHashCode();
if (loadParams_ != null) hash ^= LoadParams.GetHashCode(); if (loadParams_ != null) hash ^= LoadParams.GetHashCode();
if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode();
if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode(); if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode();
@ -874,7 +874,7 @@ namespace Grpc.Testing {
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
serverTargets_.WriteTo(output, _repeated_serverTargets_codec); serverTargets_.WriteTo(output, _repeated_serverTargets_codec);
if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { if (ClientType != 0) {
output.WriteRawTag(16); output.WriteRawTag(16);
output.WriteEnum((int) ClientType); output.WriteEnum((int) ClientType);
} }
@ -894,7 +894,7 @@ namespace Grpc.Testing {
output.WriteRawTag(56); output.WriteRawTag(56);
output.WriteInt32(AsyncClientThreads); output.WriteInt32(AsyncClientThreads);
} }
if (RpcType != global::Grpc.Testing.RpcType.UNARY) { if (RpcType != 0) {
output.WriteRawTag(64); output.WriteRawTag(64);
output.WriteEnum((int) RpcType); output.WriteEnum((int) RpcType);
} }
@ -924,7 +924,7 @@ namespace Grpc.Testing {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
size += serverTargets_.CalculateSize(_repeated_serverTargets_codec); size += serverTargets_.CalculateSize(_repeated_serverTargets_codec);
if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { if (ClientType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientType); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientType);
} }
if (securityParams_ != null) { if (securityParams_ != null) {
@ -939,7 +939,7 @@ namespace Grpc.Testing {
if (AsyncClientThreads != 0) { if (AsyncClientThreads != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncClientThreads); size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncClientThreads);
} }
if (RpcType != global::Grpc.Testing.RpcType.UNARY) { if (RpcType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RpcType); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RpcType);
} }
if (loadParams_ != null) { if (loadParams_ != null) {
@ -966,7 +966,7 @@ namespace Grpc.Testing {
return; return;
} }
serverTargets_.Add(other.serverTargets_); serverTargets_.Add(other.serverTargets_);
if (other.ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { if (other.ClientType != 0) {
ClientType = other.ClientType; ClientType = other.ClientType;
} }
if (other.securityParams_ != null) { if (other.securityParams_ != null) {
@ -984,7 +984,7 @@ namespace Grpc.Testing {
if (other.AsyncClientThreads != 0) { if (other.AsyncClientThreads != 0) {
AsyncClientThreads = other.AsyncClientThreads; AsyncClientThreads = other.AsyncClientThreads;
} }
if (other.RpcType != global::Grpc.Testing.RpcType.UNARY) { if (other.RpcType != 0) {
RpcType = other.RpcType; RpcType = other.RpcType;
} }
if (other.loadParams_ != null) { if (other.loadParams_ != null) {
@ -1515,7 +1515,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "server_type" field.</summary> /// <summary>Field number for the "server_type" field.</summary>
public const int ServerTypeFieldNumber = 1; public const int ServerTypeFieldNumber = 1;
private global::Grpc.Testing.ServerType serverType_ = global::Grpc.Testing.ServerType.SYNC_SERVER; private global::Grpc.Testing.ServerType serverType_ = 0;
public global::Grpc.Testing.ServerType ServerType { public global::Grpc.Testing.ServerType ServerType {
get { return serverType_; } get { return serverType_; }
set { set {
@ -1606,7 +1606,7 @@ namespace Grpc.Testing {
public string OtherServerApi { public string OtherServerApi {
get { return otherServerApi_; } get { return otherServerApi_; }
set { set {
otherServerApi_ = pb::Preconditions.CheckNotNull(value, "value"); otherServerApi_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -1634,7 +1634,7 @@ namespace Grpc.Testing {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) hash ^= ServerType.GetHashCode(); if (ServerType != 0) hash ^= ServerType.GetHashCode();
if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); if (securityParams_ != null) hash ^= SecurityParams.GetHashCode();
if (Port != 0) hash ^= Port.GetHashCode(); if (Port != 0) hash ^= Port.GetHashCode();
if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode(); if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode();
@ -1650,7 +1650,7 @@ namespace Grpc.Testing {
} }
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { if (ServerType != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
output.WriteEnum((int) ServerType); output.WriteEnum((int) ServerType);
} }
@ -1683,7 +1683,7 @@ namespace Grpc.Testing {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { if (ServerType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerType); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerType);
} }
if (securityParams_ != null) { if (securityParams_ != null) {
@ -1712,7 +1712,7 @@ namespace Grpc.Testing {
if (other == null) { if (other == null) {
return; return;
} }
if (other.ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { if (other.ServerType != 0) {
ServerType = other.ServerType; ServerType = other.ServerType;
} }
if (other.securityParams_ != null) { if (other.securityParams_ != null) {
@ -2436,7 +2436,7 @@ namespace Grpc.Testing {
public string Name { public string Name {
get { return name_; } get { return name_; }
set { set {
name_ = pb::Preconditions.CheckNotNull(value, "value"); name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }

@ -27,8 +27,8 @@ namespace Grpc.Testing {
"c3RpbmciBwoFRW1wdHliBnByb3RvMw==")); "c3RpbmciBwoFRW1wdHliBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Empty), global::Grpc.Testing.Empty.Parser, null, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Empty), global::Grpc.Testing.Empty.Parser, null, null, null, null)
})); }));
} }
#endregion #endregion

@ -61,7 +61,7 @@
<HintPath>..\packages\Google.Apis.Core.1.11.1\lib\net45\Google.Apis.Core.dll</HintPath> <HintPath>..\packages\Google.Apis.Core.1.11.1\lib\net45\Google.Apis.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Google.Protobuf"> <Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json"> <Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>

@ -230,13 +230,13 @@ namespace Grpc.IntegrationTesting
Console.WriteLine("running large_unary"); Console.WriteLine("running large_unary");
var request = new SimpleRequest var request = new SimpleRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseSize = 314159, ResponseSize = 314159,
Payload = CreateZerosPayload(271828) Payload = CreateZerosPayload(271828)
}; };
var response = client.UnaryCall(request); var response = client.UnaryCall(request);
Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); Assert.AreEqual(PayloadType.Compressable, response.Payload.Type);
Assert.AreEqual(314159, response.Payload.Body.Length); Assert.AreEqual(314159, response.Payload.Body.Length);
Console.WriteLine("Passed!"); Console.WriteLine("Passed!");
} }
@ -265,7 +265,7 @@ namespace Grpc.IntegrationTesting
var request = new StreamingOutputCallRequest var request = new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { bodySizes.ConvertAll((size) => new ResponseParameters { Size = size }) } ResponseParameters = { bodySizes.ConvertAll((size) => new ResponseParameters { Size = size }) }
}; };
@ -274,7 +274,7 @@ namespace Grpc.IntegrationTesting
var responseList = await call.ResponseStream.ToListAsync(); var responseList = await call.ResponseStream.ToListAsync();
foreach (var res in responseList) foreach (var res in responseList)
{ {
Assert.AreEqual(PayloadType.COMPRESSABLE, res.Payload.Type); Assert.AreEqual(PayloadType.Compressable, res.Payload.Type);
} }
CollectionAssert.AreEqual(bodySizes, responseList.ConvertAll((item) => item.Payload.Body.Length)); CollectionAssert.AreEqual(bodySizes, responseList.ConvertAll((item) => item.Payload.Body.Length));
} }
@ -289,46 +289,46 @@ namespace Grpc.IntegrationTesting
{ {
await call.RequestStream.WriteAsync(new StreamingOutputCallRequest await call.RequestStream.WriteAsync(new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 31415 } }, ResponseParameters = { new ResponseParameters { Size = 31415 } },
Payload = CreateZerosPayload(27182) Payload = CreateZerosPayload(27182)
}); });
Assert.IsTrue(await call.ResponseStream.MoveNext()); Assert.IsTrue(await call.ResponseStream.MoveNext());
Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type);
Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length);
await call.RequestStream.WriteAsync(new StreamingOutputCallRequest await call.RequestStream.WriteAsync(new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 9 } }, ResponseParameters = { new ResponseParameters { Size = 9 } },
Payload = CreateZerosPayload(8) Payload = CreateZerosPayload(8)
}); });
Assert.IsTrue(await call.ResponseStream.MoveNext()); Assert.IsTrue(await call.ResponseStream.MoveNext());
Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type);
Assert.AreEqual(9, call.ResponseStream.Current.Payload.Body.Length); Assert.AreEqual(9, call.ResponseStream.Current.Payload.Body.Length);
await call.RequestStream.WriteAsync(new StreamingOutputCallRequest await call.RequestStream.WriteAsync(new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 2653 } }, ResponseParameters = { new ResponseParameters { Size = 2653 } },
Payload = CreateZerosPayload(1828) Payload = CreateZerosPayload(1828)
}); });
Assert.IsTrue(await call.ResponseStream.MoveNext()); Assert.IsTrue(await call.ResponseStream.MoveNext());
Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type);
Assert.AreEqual(2653, call.ResponseStream.Current.Payload.Body.Length); Assert.AreEqual(2653, call.ResponseStream.Current.Payload.Body.Length);
await call.RequestStream.WriteAsync(new StreamingOutputCallRequest await call.RequestStream.WriteAsync(new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 58979 } }, ResponseParameters = { new ResponseParameters { Size = 58979 } },
Payload = CreateZerosPayload(45904) Payload = CreateZerosPayload(45904)
}); });
Assert.IsTrue(await call.ResponseStream.MoveNext()); Assert.IsTrue(await call.ResponseStream.MoveNext());
Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type);
Assert.AreEqual(58979, call.ResponseStream.Current.Payload.Body.Length); Assert.AreEqual(58979, call.ResponseStream.Current.Payload.Body.Length);
await call.RequestStream.CompleteAsync(); await call.RequestStream.CompleteAsync();
@ -357,7 +357,7 @@ namespace Grpc.IntegrationTesting
var request = new SimpleRequest var request = new SimpleRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseSize = 314159, ResponseSize = 314159,
Payload = CreateZerosPayload(271828), Payload = CreateZerosPayload(271828),
FillUsername = true, FillUsername = true,
@ -367,7 +367,7 @@ namespace Grpc.IntegrationTesting
// not setting credentials here because they were set on channel already // not setting credentials here because they were set on channel already
var response = client.UnaryCall(request); var response = client.UnaryCall(request);
Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); Assert.AreEqual(PayloadType.Compressable, response.Payload.Type);
Assert.AreEqual(314159, response.Payload.Body.Length); Assert.AreEqual(314159, response.Payload.Body.Length);
Assert.False(string.IsNullOrEmpty(response.OauthScope)); Assert.False(string.IsNullOrEmpty(response.OauthScope));
Assert.True(oauthScope.Contains(response.OauthScope)); Assert.True(oauthScope.Contains(response.OauthScope));
@ -381,7 +381,7 @@ namespace Grpc.IntegrationTesting
var request = new SimpleRequest var request = new SimpleRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseSize = 314159, ResponseSize = 314159,
Payload = CreateZerosPayload(271828), Payload = CreateZerosPayload(271828),
FillUsername = true, FillUsername = true,
@ -390,7 +390,7 @@ namespace Grpc.IntegrationTesting
// not setting credentials here because they were set on channel already // not setting credentials here because they were set on channel already
var response = client.UnaryCall(request); var response = client.UnaryCall(request);
Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); Assert.AreEqual(PayloadType.Compressable, response.Payload.Type);
Assert.AreEqual(314159, response.Payload.Body.Length); Assert.AreEqual(314159, response.Payload.Body.Length);
Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username); Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username);
Console.WriteLine("Passed!"); Console.WriteLine("Passed!");
@ -460,13 +460,13 @@ namespace Grpc.IntegrationTesting
{ {
await call.RequestStream.WriteAsync(new StreamingOutputCallRequest await call.RequestStream.WriteAsync(new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 31415 } }, ResponseParameters = { new ResponseParameters { Size = 31415 } },
Payload = CreateZerosPayload(27182) Payload = CreateZerosPayload(27182)
}); });
Assert.IsTrue(await call.ResponseStream.MoveNext()); Assert.IsTrue(await call.ResponseStream.MoveNext());
Assert.AreEqual(PayloadType.COMPRESSABLE, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type);
Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length);
cts.Cancel(); cts.Cancel();
@ -507,7 +507,7 @@ namespace Grpc.IntegrationTesting
// step 1: test unary call // step 1: test unary call
var request = new SimpleRequest var request = new SimpleRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseSize = 314159, ResponseSize = 314159,
Payload = CreateZerosPayload(271828) Payload = CreateZerosPayload(271828)
}; };
@ -526,7 +526,7 @@ namespace Grpc.IntegrationTesting
// step 2: test full duplex call // step 2: test full duplex call
var request = new StreamingOutputCallRequest var request = new StreamingOutputCallRequest
{ {
ResponseType = PayloadType.COMPRESSABLE, ResponseType = PayloadType.Compressable,
ResponseParameters = { new ResponseParameters { Size = 31415 } }, ResponseParameters = { new ResponseParameters { Size = 31415 } },
Payload = CreateZerosPayload(27182) Payload = CreateZerosPayload(27182)
}; };

@ -55,18 +55,18 @@ namespace Grpc.Testing {
"TkUQABIICgRHWklQEAESCwoHREVGTEFURRACYgZwcm90bzM=")); "TkUQABIICgRHWklQEAESCwoHREVGTEFURRACYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompression", "ResponseStatus" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompression", "ResponseStatus" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectParams), global::Grpc.Testing.ReconnectParams.Parser, new[]{ "MaxReconnectBackoffMs" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ReconnectParams), global::Grpc.Testing.ReconnectParams.Parser, new[]{ "MaxReconnectBackoffMs" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null)
})); }));
} }
#endregion #endregion
@ -80,15 +80,15 @@ namespace Grpc.Testing {
/// <summary> /// <summary>
/// Compressable text format. /// Compressable text format.
/// </summary> /// </summary>
COMPRESSABLE = 0, [pbr::OriginalName("COMPRESSABLE")] Compressable = 0,
/// <summary> /// <summary>
/// Uncompressable binary format. /// Uncompressable binary format.
/// </summary> /// </summary>
UNCOMPRESSABLE = 1, [pbr::OriginalName("UNCOMPRESSABLE")] Uncompressable = 1,
/// <summary> /// <summary>
/// Randomly chosen from all other formats defined in this enum. /// Randomly chosen from all other formats defined in this enum.
/// </summary> /// </summary>
RANDOM = 2, [pbr::OriginalName("RANDOM")] Random = 2,
} }
/// <summary> /// <summary>
@ -98,9 +98,9 @@ namespace Grpc.Testing {
/// <summary> /// <summary>
/// No compression /// No compression
/// </summary> /// </summary>
NONE = 0, [pbr::OriginalName("NONE")] None = 0,
GZIP = 1, [pbr::OriginalName("GZIP")] Gzip = 1,
DEFLATE = 2, [pbr::OriginalName("DEFLATE")] Deflate = 2,
} }
#endregion #endregion
@ -139,7 +139,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "type" field.</summary> /// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1; public const int TypeFieldNumber = 1;
private global::Grpc.Testing.PayloadType type_ = global::Grpc.Testing.PayloadType.COMPRESSABLE; private global::Grpc.Testing.PayloadType type_ = 0;
/// <summary> /// <summary>
/// The type of data in body. /// The type of data in body.
/// </summary> /// </summary>
@ -159,7 +159,7 @@ namespace Grpc.Testing {
public pb::ByteString Body { public pb::ByteString Body {
get { return body_; } get { return body_; }
set { set {
body_ = pb::Preconditions.CheckNotNull(value, "value"); body_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -181,7 +181,7 @@ namespace Grpc.Testing {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= Type.GetHashCode(); if (Type != 0) hash ^= Type.GetHashCode();
if (Body.Length != 0) hash ^= Body.GetHashCode(); if (Body.Length != 0) hash ^= Body.GetHashCode();
return hash; return hash;
} }
@ -191,7 +191,7 @@ namespace Grpc.Testing {
} }
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (Type != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
output.WriteEnum((int) Type); output.WriteEnum((int) Type);
} }
@ -203,7 +203,7 @@ namespace Grpc.Testing {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (Type != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
} }
if (Body.Length != 0) { if (Body.Length != 0) {
@ -216,7 +216,7 @@ namespace Grpc.Testing {
if (other == null) { if (other == null) {
return; return;
} }
if (other.Type != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (other.Type != 0) {
Type = other.Type; Type = other.Type;
} }
if (other.Body.Length != 0) { if (other.Body.Length != 0) {
@ -293,7 +293,7 @@ namespace Grpc.Testing {
public string Message { public string Message {
get { return message_; } get { return message_; }
set { set {
message_ = pb::Preconditions.CheckNotNull(value, "value"); message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -417,7 +417,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "response_type" field.</summary> /// <summary>Field number for the "response_type" field.</summary>
public const int ResponseTypeFieldNumber = 1; public const int ResponseTypeFieldNumber = 1;
private global::Grpc.Testing.PayloadType responseType_ = global::Grpc.Testing.PayloadType.COMPRESSABLE; private global::Grpc.Testing.PayloadType responseType_ = 0;
/// <summary> /// <summary>
/// Desired payload type in the response from the server. /// Desired payload type in the response from the server.
/// If response_type is RANDOM, server randomly chooses one from other formats. /// If response_type is RANDOM, server randomly chooses one from other formats.
@ -484,7 +484,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "response_compression" field.</summary> /// <summary>Field number for the "response_compression" field.</summary>
public const int ResponseCompressionFieldNumber = 6; public const int ResponseCompressionFieldNumber = 6;
private global::Grpc.Testing.CompressionType responseCompression_ = global::Grpc.Testing.CompressionType.NONE; private global::Grpc.Testing.CompressionType responseCompression_ = 0;
/// <summary> /// <summary>
/// Compression algorithm to be used by the server for the response (stream) /// Compression algorithm to be used by the server for the response (stream)
/// </summary> /// </summary>
@ -531,12 +531,12 @@ namespace Grpc.Testing {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= ResponseType.GetHashCode(); if (ResponseType != 0) hash ^= ResponseType.GetHashCode();
if (ResponseSize != 0) hash ^= ResponseSize.GetHashCode(); if (ResponseSize != 0) hash ^= ResponseSize.GetHashCode();
if (payload_ != null) hash ^= Payload.GetHashCode(); if (payload_ != null) hash ^= Payload.GetHashCode();
if (FillUsername != false) hash ^= FillUsername.GetHashCode(); if (FillUsername != false) hash ^= FillUsername.GetHashCode();
if (FillOauthScope != false) hash ^= FillOauthScope.GetHashCode(); if (FillOauthScope != false) hash ^= FillOauthScope.GetHashCode();
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) hash ^= ResponseCompression.GetHashCode(); if (ResponseCompression != 0) hash ^= ResponseCompression.GetHashCode();
if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode();
return hash; return hash;
} }
@ -546,7 +546,7 @@ namespace Grpc.Testing {
} }
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (ResponseType != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
output.WriteEnum((int) ResponseType); output.WriteEnum((int) ResponseType);
} }
@ -566,7 +566,7 @@ namespace Grpc.Testing {
output.WriteRawTag(40); output.WriteRawTag(40);
output.WriteBool(FillOauthScope); output.WriteBool(FillOauthScope);
} }
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (ResponseCompression != 0) {
output.WriteRawTag(48); output.WriteRawTag(48);
output.WriteEnum((int) ResponseCompression); output.WriteEnum((int) ResponseCompression);
} }
@ -578,7 +578,7 @@ namespace Grpc.Testing {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (ResponseType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType);
} }
if (ResponseSize != 0) { if (ResponseSize != 0) {
@ -593,7 +593,7 @@ namespace Grpc.Testing {
if (FillOauthScope != false) { if (FillOauthScope != false) {
size += 1 + 1; size += 1 + 1;
} }
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (ResponseCompression != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression);
} }
if (responseStatus_ != null) { if (responseStatus_ != null) {
@ -606,7 +606,7 @@ namespace Grpc.Testing {
if (other == null) { if (other == null) {
return; return;
} }
if (other.ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (other.ResponseType != 0) {
ResponseType = other.ResponseType; ResponseType = other.ResponseType;
} }
if (other.ResponseSize != 0) { if (other.ResponseSize != 0) {
@ -624,7 +624,7 @@ namespace Grpc.Testing {
if (other.FillOauthScope != false) { if (other.FillOauthScope != false) {
FillOauthScope = other.FillOauthScope; FillOauthScope = other.FillOauthScope;
} }
if (other.ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (other.ResponseCompression != 0) {
ResponseCompression = other.ResponseCompression; ResponseCompression = other.ResponseCompression;
} }
if (other.responseStatus_ != null) { if (other.responseStatus_ != null) {
@ -737,7 +737,7 @@ namespace Grpc.Testing {
public string Username { public string Username {
get { return username_; } get { return username_; }
set { set {
username_ = pb::Preconditions.CheckNotNull(value, "value"); username_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -750,7 +750,7 @@ namespace Grpc.Testing {
public string OauthScope { public string OauthScope {
get { return oauthScope_; } get { return oauthScope_; }
set { set {
oauthScope_ = pb::Preconditions.CheckNotNull(value, "value"); oauthScope_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -1259,7 +1259,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "response_type" field.</summary> /// <summary>Field number for the "response_type" field.</summary>
public const int ResponseTypeFieldNumber = 1; public const int ResponseTypeFieldNumber = 1;
private global::Grpc.Testing.PayloadType responseType_ = global::Grpc.Testing.PayloadType.COMPRESSABLE; private global::Grpc.Testing.PayloadType responseType_ = 0;
/// <summary> /// <summary>
/// Desired payload type in the response from the server. /// Desired payload type in the response from the server.
/// If response_type is RANDOM, the payload from each response in the stream /// If response_type is RANDOM, the payload from each response in the stream
@ -1300,7 +1300,7 @@ namespace Grpc.Testing {
/// <summary>Field number for the "response_compression" field.</summary> /// <summary>Field number for the "response_compression" field.</summary>
public const int ResponseCompressionFieldNumber = 6; public const int ResponseCompressionFieldNumber = 6;
private global::Grpc.Testing.CompressionType responseCompression_ = global::Grpc.Testing.CompressionType.NONE; private global::Grpc.Testing.CompressionType responseCompression_ = 0;
/// <summary> /// <summary>
/// Compression algorithm to be used by the server for the response (stream) /// Compression algorithm to be used by the server for the response (stream)
/// </summary> /// </summary>
@ -1345,10 +1345,10 @@ namespace Grpc.Testing {
public override int GetHashCode() { public override int GetHashCode() {
int hash = 1; int hash = 1;
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) hash ^= ResponseType.GetHashCode(); if (ResponseType != 0) hash ^= ResponseType.GetHashCode();
hash ^= responseParameters_.GetHashCode(); hash ^= responseParameters_.GetHashCode();
if (payload_ != null) hash ^= Payload.GetHashCode(); if (payload_ != null) hash ^= Payload.GetHashCode();
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) hash ^= ResponseCompression.GetHashCode(); if (ResponseCompression != 0) hash ^= ResponseCompression.GetHashCode();
if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode();
return hash; return hash;
} }
@ -1358,7 +1358,7 @@ namespace Grpc.Testing {
} }
public void WriteTo(pb::CodedOutputStream output) { public void WriteTo(pb::CodedOutputStream output) {
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (ResponseType != 0) {
output.WriteRawTag(8); output.WriteRawTag(8);
output.WriteEnum((int) ResponseType); output.WriteEnum((int) ResponseType);
} }
@ -1367,7 +1367,7 @@ namespace Grpc.Testing {
output.WriteRawTag(26); output.WriteRawTag(26);
output.WriteMessage(Payload); output.WriteMessage(Payload);
} }
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (ResponseCompression != 0) {
output.WriteRawTag(48); output.WriteRawTag(48);
output.WriteEnum((int) ResponseCompression); output.WriteEnum((int) ResponseCompression);
} }
@ -1379,14 +1379,14 @@ namespace Grpc.Testing {
public int CalculateSize() { public int CalculateSize() {
int size = 0; int size = 0;
if (ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (ResponseType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseType);
} }
size += responseParameters_.CalculateSize(_repeated_responseParameters_codec); size += responseParameters_.CalculateSize(_repeated_responseParameters_codec);
if (payload_ != null) { if (payload_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload); size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
} }
if (ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (ResponseCompression != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression); size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression);
} }
if (responseStatus_ != null) { if (responseStatus_ != null) {
@ -1399,7 +1399,7 @@ namespace Grpc.Testing {
if (other == null) { if (other == null) {
return; return;
} }
if (other.ResponseType != global::Grpc.Testing.PayloadType.COMPRESSABLE) { if (other.ResponseType != 0) {
ResponseType = other.ResponseType; ResponseType = other.ResponseType;
} }
responseParameters_.Add(other.responseParameters_); responseParameters_.Add(other.responseParameters_);
@ -1409,7 +1409,7 @@ namespace Grpc.Testing {
} }
Payload.MergeFrom(other.Payload); Payload.MergeFrom(other.Payload);
} }
if (other.ResponseCompression != global::Grpc.Testing.CompressionType.NONE) { if (other.ResponseCompression != 0) {
ResponseCompression = other.ResponseCompression; ResponseCompression = other.ResponseCompression;
} }
if (other.responseStatus_ != null) { if (other.responseStatus_ != null) {

@ -34,10 +34,10 @@ namespace Grpc.Testing {
"dWdlUmVzcG9uc2ViBnByb3RvMw==")); "dWdlUmVzcG9uc2ViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.GaugeResponse), global::Grpc.Testing.GaugeResponse.Parser, new[]{ "Name", "LongValue", "DoubleValue", "StringValue" }, new[]{ "Value" }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.GaugeResponse), global::Grpc.Testing.GaugeResponse.Parser, new[]{ "Name", "LongValue", "DoubleValue", "StringValue" }, new[]{ "Value" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.GaugeRequest), global::Grpc.Testing.GaugeRequest.Parser, new[]{ "Name" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.GaugeRequest), global::Grpc.Testing.GaugeRequest.Parser, new[]{ "Name" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.EmptyMessage), global::Grpc.Testing.EmptyMessage.Parser, null, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EmptyMessage), global::Grpc.Testing.EmptyMessage.Parser, null, null, null, null)
})); }));
} }
#endregion #endregion
@ -92,7 +92,7 @@ namespace Grpc.Testing {
public string Name { public string Name {
get { return name_; } get { return name_; }
set { set {
name_ = pb::Preconditions.CheckNotNull(value, "value"); name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -121,7 +121,7 @@ namespace Grpc.Testing {
public string StringValue { public string StringValue {
get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; } get { return valueCase_ == ValueOneofCase.StringValue ? (string) value_ : ""; }
set { set {
value_ = pb::Preconditions.CheckNotNull(value, "value"); value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
valueCase_ = ValueOneofCase.StringValue; valueCase_ = ValueOneofCase.StringValue;
} }
} }
@ -299,7 +299,7 @@ namespace Grpc.Testing {
public string Name { public string Name {
get { return name_; } get { return name_; }
set { set {
name_ = pb::Preconditions.CheckNotNull(value, "value"); name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }

@ -34,11 +34,11 @@ namespace Grpc.Testing {
"aW5nLkNvbXBsZXhQcm90b1BhcmFtc0gAQgkKB3BheWxvYWRiBnByb3RvMw==")); "aW5nLkNvbXBsZXhQcm90b1BhcmFtc0gAQgkKB3BheWxvYWRiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ByteBufferParams), global::Grpc.Testing.ByteBufferParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ByteBufferParams), global::Grpc.Testing.ByteBufferParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SimpleProtoParams), global::Grpc.Testing.SimpleProtoParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleProtoParams), global::Grpc.Testing.SimpleProtoParams.Parser, new[]{ "ReqSize", "RespSize" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ComplexProtoParams), global::Grpc.Testing.ComplexProtoParams.Parser, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ComplexProtoParams), global::Grpc.Testing.ComplexProtoParams.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PayloadConfig), global::Grpc.Testing.PayloadConfig.Parser, new[]{ "BytebufParams", "SimpleParams", "ComplexParams" }, new[]{ "Payload" }, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.PayloadConfig), global::Grpc.Testing.PayloadConfig.Parser, new[]{ "BytebufParams", "SimpleParams", "ComplexParams" }, new[]{ "Payload" }, null, null)
})); }));
} }
#endregion #endregion

@ -55,7 +55,7 @@ namespace Grpc.IntegrationTesting
{ {
var serverConfig = new ServerConfig var serverConfig = new ServerConfig
{ {
ServerType = ServerType.ASYNC_SERVER ServerType = ServerType.AsyncServer
}; };
serverRunner = ServerRunners.CreateStarted(serverConfig); serverRunner = ServerRunners.CreateStarted(serverConfig);
} }
@ -75,7 +75,7 @@ namespace Grpc.IntegrationTesting
var config = new ClientConfig var config = new ClientConfig
{ {
ServerTargets = { string.Format("{0}:{1}", "localhost", serverRunner.BoundPort) }, ServerTargets = { string.Format("{0}:{1}", "localhost", serverRunner.BoundPort) },
RpcType = RpcType.UNARY, RpcType = RpcType.Unary,
LoadParams = new LoadParams { ClosedLoop = new ClosedLoopParams() }, LoadParams = new LoadParams { ClosedLoop = new ClosedLoopParams() },
PayloadConfig = new PayloadConfig PayloadConfig = new PayloadConfig
{ {

@ -77,13 +77,13 @@ namespace Grpc.IntegrationTesting
} }
ServerServiceDefinition service = null; ServerServiceDefinition service = null;
if (config.ServerType == ServerType.ASYNC_SERVER) if (config.ServerType == ServerType.AsyncServer)
{ {
GrpcPreconditions.CheckArgument(config.PayloadConfig == null, GrpcPreconditions.CheckArgument(config.PayloadConfig == null,
"ServerConfig.PayloadConfig shouldn't be set for BenchmarkService based server."); "ServerConfig.PayloadConfig shouldn't be set for BenchmarkService based server.");
service = BenchmarkService.BindService(new BenchmarkServiceImpl()); service = BenchmarkService.BindService(new BenchmarkServiceImpl());
} }
else if (config.ServerType == ServerType.ASYNC_GENERIC_SERVER) else if (config.ServerType == ServerType.AsyncGenericServer)
{ {
var genericService = new GenericServiceImpl(config.PayloadConfig.BytebufParams.RespSize); var genericService = new GenericServiceImpl(config.PayloadConfig.BytebufParams.RespSize);
service = GenericService.BindHandler(genericService.StreamingCall); service = GenericService.BindHandler(genericService.StreamingCall);

@ -39,7 +39,7 @@ namespace Grpc.Testing {
"YgZwcm90bzM=")); "YgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, }, new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, },
new pbr::GeneratedCodeInfo(null, null)); new pbr::GeneratedClrTypeInfo(null, null));
} }
#endregion #endregion

@ -35,11 +35,11 @@ namespace Grpc.Testing {
"ZXIYAyABKAESEwoLdGltZV9zeXN0ZW0YBCABKAFiBnByb3RvMw==")); "ZXIYAyABKAESEwoLdGltZV9zeXN0ZW0YBCABKAFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStats), global::Grpc.Testing.ServerStats.Parser, new[]{ "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.HistogramParams), global::Grpc.Testing.HistogramParams.Parser, new[]{ "Resolution", "MaxPossible" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramParams), global::Grpc.Testing.HistogramParams.Parser, new[]{ "Resolution", "MaxPossible" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.HistogramData), global::Grpc.Testing.HistogramData.Parser, new[]{ "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.HistogramData), global::Grpc.Testing.HistogramData.Parser, new[]{ "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStats), global::Grpc.Testing.ClientStats.Parser, new[]{ "Latencies", "TimeElapsed", "TimeUser", "TimeSystem" }, null, null, null)
})); }));
} }
#endregion #endregion

@ -46,7 +46,7 @@ namespace Grpc.Testing {
"cnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z")); "cnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, }, new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, },
new pbr::GeneratedCodeInfo(null, null)); new pbr::GeneratedClrTypeInfo(null, null));
} }
#endregion #endregion

@ -4,7 +4,7 @@
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" /> <package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
<package id="Google.Apis.Auth" version="1.11.1" targetFramework="net45" /> <package id="Google.Apis.Auth" version="1.11.1" targetFramework="net45" />
<package id="Google.Apis.Core" version="1.11.1" targetFramework="net45" /> <package id="Google.Apis.Core" version="1.11.1" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" /> <package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />

@ -2,7 +2,7 @@
@rem Current package versions @rem Current package versions
set VERSION=0.14.2-pre1 set VERSION=0.14.2-pre1
set PROTOBUF_VERSION=3.0.0-beta2 set PROTOBUF_VERSION=3.0.0-beta3
@rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well.
set VERSION_WITH_BETA=%VERSION%-beta set VERSION_WITH_BETA=%VERSION%-beta

@ -4,7 +4,7 @@
@rem Current package versions @rem Current package versions
set VERSION=${settings.csharp_version} set VERSION=${settings.csharp_version}
set PROTOBUF_VERSION=3.0.0-beta2 set PROTOBUF_VERSION=3.0.0-beta3
@rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well.
set VERSION_WITH_BETA=%VERSION%-beta set VERSION_WITH_BETA=%VERSION%-beta

@ -1 +1 @@
Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14

@ -45,7 +45,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f)
c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0)
f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463)
a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 third_party/protobuf (v3.0.0-beta-3-pre1) 3470b6895aa659b7559ed678e029a5338e535f14 third_party/protobuf (v3.0.0-beta-2-441-g3470b68)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
EOF EOF

Loading…
Cancel
Save