Merge pull request #12127 from jtattermusch/csharp_warningsaserrors

C# treat compiler warnings as error.
pull/12195/head
Jan Tattermusch 7 years ago committed by GitHub
commit 30b4e74296
  1. 5
      examples/csharp/helloworld-from-cli/global.json
  2. 1
      src/compiler/csharp_generator.cc
  3. 1
      src/csharp/Grpc.Auth/Grpc.Auth.csproj
  4. 1
      src/csharp/Grpc.Core.Testing/Grpc.Core.Testing.csproj
  5. 52
      src/csharp/Grpc.Core.Tests/ClientServerTest.cs
  6. 4
      src/csharp/Grpc.Core.Tests/CompressionTest.cs
  7. 8
      src/csharp/Grpc.Core.Tests/ContextPropagationTest.cs
  8. 1
      src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj
  9. 4
      src/csharp/Grpc.Core.Tests/HalfcloseTest.cs
  10. 5
      src/csharp/Grpc.Core.Tests/Internal/CompletionQueueEventTest.cs
  11. 3
      src/csharp/Grpc.Core.Tests/Internal/TimespecTest.cs
  12. 14
      src/csharp/Grpc.Core.Tests/MockServiceHelper.cs
  13. 4
      src/csharp/Grpc.Core.Tests/PerformanceTest.cs
  14. 8
      src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs
  15. 17
      src/csharp/Grpc.Core.Tests/ThreadingModelTest.cs
  16. 8
      src/csharp/Grpc.Core.Tests/TimeoutsTest.cs
  17. 1
      src/csharp/Grpc.Core/Grpc.Core.csproj
  18. 3
      src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
  19. 1
      src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj
  20. 1
      src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj
  21. 1
      src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
  22. 6
      src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
  23. 1
      src/csharp/Grpc.Examples/Grpc.Examples.csproj
  24. 1
      src/csharp/Grpc.Examples/MathGrpc.cs
  25. 3
      src/csharp/Grpc.Examples/MathServiceImpl.cs
  26. 1
      src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
  27. 4
      src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
  28. 1
      src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj
  29. 1
      src/csharp/Grpc.HealthCheck/HealthGrpc.cs
  30. 1
      src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj
  31. 1
      src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.csproj
  32. 1
      src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj
  33. 1
      src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.csproj
  34. 248
      src/csharp/Grpc.IntegrationTesting/Control.cs
  35. 6
      src/csharp/Grpc.IntegrationTesting/CustomErrorDetailsTest.cs
  36. 6
      src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs
  37. 1
      src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
  38. 4
      src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs
  39. 1
      src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs
  40. 4
      src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs
  41. 1
      src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs
  42. 10
      src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs
  43. 1
      src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
  44. 5
      src/csharp/Grpc.IntegrationTesting/TestServiceImpl.cs
  45. 1
      src/csharp/Grpc.Microbenchmarks/Grpc.Microbenchmarks.csproj
  46. 1
      src/csharp/Grpc.Reflection.Tests/Grpc.Reflection.Tests.csproj
  47. 4
      src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs
  48. 1
      src/csharp/Grpc.Reflection/Grpc.Reflection.csproj
  49. 1
      src/csharp/Grpc.Reflection/ReflectionGrpc.cs
  50. 3
      src/csharp/Grpc.Reflection/ReflectionServiceImpl.cs
  51. 5
      src/csharp/global.json

@ -0,0 +1,5 @@
{
"sdk": {
"version": "1.0.0"
}
}

@ -670,6 +670,7 @@ grpc::string GetServices(const FileDescriptor *file, bool generate_client,
out.Print(leading_comments.c_str());
}
out.Print("#pragma warning disable 1591\n");
out.Print("#region Designer generated code\n");
out.Print("\n");
out.Print("using System;\n");

@ -19,6 +19,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -19,6 +19,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -57,9 +57,9 @@ namespace Grpc.Core.Tests
[Test]
public async Task UnaryCall()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
return request;
return Task.FromResult(request);
});
Assert.AreEqual("ABC", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "ABC"));
@ -124,10 +124,10 @@ namespace Grpc.Core.Tests
[Test]
public void UnaryCall_ServerHandlerSetsStatus()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
context.Status = new Status(StatusCode.Unauthenticated, "");
return "";
return Task.FromResult("");
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
@ -142,11 +142,11 @@ namespace Grpc.Core.Tests
[Test]
public void UnaryCall_ServerHandlerSetsStatusAndTrailers()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
context.Status = new Status(StatusCode.Unauthenticated, "");
context.ResponseTrailers.Add("xyz", "xyz-value");
return "";
return Task.FromResult("");
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
@ -168,9 +168,10 @@ namespace Grpc.Core.Tests
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>
{
string result = "";
await requestStream.ForEachAsync(async (request) =>
await requestStream.ForEachAsync((request) =>
{
result += request;
return TaskUtils.CompletedTask;
});
await Task.Delay(100);
return result;
@ -203,9 +204,7 @@ namespace Grpc.Core.Tests
[Test]
public async Task ServerStreamingCall_EndOfStreamIsIdempotent()
{
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>(async (request, responseStream, context) =>
{
});
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>((request, responseStream, context) => TaskUtils.CompletedTask);
var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), "");
@ -214,11 +213,12 @@ namespace Grpc.Core.Tests
}
[Test]
public async Task ServerStreamingCall_ErrorCanBeAwaitedTwice()
public void ServerStreamingCall_ErrorCanBeAwaitedTwice()
{
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>(async (request, responseStream, context) =>
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>((request, responseStream, context) =>
{
context.Status = new Status(StatusCode.InvalidArgument, "");
return TaskUtils.CompletedTask;
});
var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), "");
@ -232,9 +232,9 @@ namespace Grpc.Core.Tests
}
[Test]
public async Task ServerStreamingCall_TrailersFromMultipleSourcesGetConcatenated()
public void ServerStreamingCall_TrailersFromMultipleSourcesGetConcatenated()
{
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>(async (request, responseStream, context) =>
helper.ServerStreamingHandler = new ServerStreamingServerMethod<string, string>((request, responseStream, context) =>
{
context.ResponseTrailers.Add("xyz", "xyz-value");
throw new RpcException(new Status(StatusCode.InvalidArgument, ""), new Metadata { {"abc", "abc-value"} });
@ -343,7 +343,7 @@ namespace Grpc.Core.Tests
[Test]
public async Task AsyncUnaryCall_EchoMetadata()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
foreach (Metadata.Entry metadataEntry in context.RequestHeaders)
{
@ -352,7 +352,7 @@ namespace Grpc.Core.Tests
context.ResponseTrailers.Add(metadataEntry);
}
}
return "";
return Task.FromResult("");
});
var headers = new Metadata
@ -395,10 +395,10 @@ namespace Grpc.Core.Tests
{
// some japanese and chinese characters
var nonAsciiString = "\u30a1\u30a2\u30a3 \u62b5\u6297\u662f\u5f92\u52b3\u7684";
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
context.Status = new Status(StatusCode.Unknown, nonAsciiString);
return "";
return Task.FromResult("");
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
@ -409,9 +409,9 @@ namespace Grpc.Core.Tests
[Test]
public void ServerCallContext_PeerInfoPresent()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
return context.Peer;
return Task.FromResult(context.Peer);
});
string peer = Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc");
@ -421,11 +421,11 @@ namespace Grpc.Core.Tests
[Test]
public void ServerCallContext_HostAndMethodPresent()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.IsTrue(context.Host.Contains(Host));
Assert.AreEqual("/tests.Test/Unary", context.Method);
return "PASS";
return Task.FromResult("PASS");
});
Assert.AreEqual("PASS", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
}
@ -433,11 +433,11 @@ namespace Grpc.Core.Tests
[Test]
public void ServerCallContext_AuthContextNotPopulated()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.IsFalse(context.AuthContext.IsPeerAuthenticated);
Assert.AreEqual(0, context.AuthContext.Properties.Count());
return "PASS";
return Task.FromResult("PASS");
});
Assert.AreEqual("PASS", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
}
@ -445,9 +445,9 @@ namespace Grpc.Core.Tests
[Test]
public async Task Channel_WaitForStateChangedAsync()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
return request;
return Task.FromResult(request);
});
Assert.ThrowsAsync(typeof(TaskCanceledException),

@ -55,10 +55,10 @@ namespace Grpc.Core.Tests
[Test]
public void WriteOptions_Unary()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
context.WriteOptions = new WriteOptions(WriteFlags.NoCompress);
return request;
return Task.FromResult(request);
});
var callOptions = new CallOptions(writeOptions: new WriteOptions(WriteFlags.NoCompress));

@ -106,11 +106,11 @@ namespace Grpc.Core.Tests
public async Task PropagateDeadline()
{
var deadline = DateTime.UtcNow.AddDays(7);
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.IsTrue(context.Deadline < deadline.AddMinutes(1));
Assert.IsTrue(context.Deadline > deadline.AddMinutes(-1));
return "PASS";
return Task.FromResult("PASS");
});
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>
@ -135,10 +135,10 @@ namespace Grpc.Core.Tests
[Test]
public async Task SuppressDeadlinePropagation()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.AreEqual(DateTime.MaxValue, context.Deadline);
return "PASS";
return Task.FromResult("PASS");
});
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>

@ -10,6 +10,7 @@
<PackageId>Grpc.Core.Tests</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -62,9 +62,9 @@ namespace Grpc.Core.Tests
[Test]
public async Task HalfcloseAfterFullclose_ClientStreamingCall()
{
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>((requestStream, context) =>
{
return "PASS";
return Task.FromResult("PASS");
});
var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall());

@ -29,9 +29,12 @@ namespace Grpc.Core.Internal.Tests
public class CompletionQueueEventTest
{
[Test]
public void CreateAndDestroy()
public void CompletionQueueEventSizeIsNativeSize()
{
#pragma warning disable 0618
// We need to use the obsolete non-generic version of Marshal.SizeOf because the generic version is not available in net45
Assert.AreEqual(CompletionQueueEvent.NativeSize, Marshal.SizeOf(typeof(CompletionQueueEvent)));
#pragma warning restore 0618
}
}
}

@ -60,7 +60,10 @@ namespace Grpc.Core.Internal.Tests
[Test]
public void TimespecSizeIsNativeSize()
{
#pragma warning disable 0618
// We need to use the obsolete non-generic version of Marshal.SizeOf because the generic version is not available in net45
Assert.AreEqual(Timespec.NativeSize, Marshal.SizeOf(typeof(Timespec)));
#pragma warning restore 0618
}
[Test]

@ -96,26 +96,28 @@ namespace Grpc.Core.Tests
var defaultStatus = new Status(StatusCode.Unknown, "Default mock implementation. Please provide your own.");
unaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
unaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
context.Status = defaultStatus;
return "";
return Task.FromResult("");
});
clientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>
clientStreamingHandler = new ClientStreamingServerMethod<string, string>((requestStream, context) =>
{
context.Status = defaultStatus;
return "";
return Task.FromResult("");
});
serverStreamingHandler = new ServerStreamingServerMethod<string, string>(async (request, responseStream, context) =>
serverStreamingHandler = new ServerStreamingServerMethod<string, string>((request, responseStream, context) =>
{
context.Status = defaultStatus;
return TaskUtils.CompletedTask;
});
duplexStreamingHandler = new DuplexStreamingServerMethod<string, string>(async (requestStream, responseStream, context) =>
duplexStreamingHandler = new DuplexStreamingServerMethod<string, string>((requestStream, responseStream, context) =>
{
context.Status = defaultStatus;
return TaskUtils.CompletedTask;
});
}

@ -61,9 +61,9 @@ namespace Grpc.Core.Tests
var profiler = new BasicProfiler();
Profilers.SetForCurrentThread(profiler);
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
return request;
return Task.FromResult(request);
});
var callDetails = helper.CreateUnaryCall();

@ -138,10 +138,10 @@ namespace Grpc.Core.Tests
[Test]
public void WriteResponseHeaders_NullNotAllowed()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.ThrowsAsync(typeof(ArgumentNullException), async () => await context.WriteResponseHeadersAsync(null));
return "PASS";
return Task.FromResult("PASS");
});
Assert.AreEqual("PASS", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), ""));
@ -158,7 +158,7 @@ namespace Grpc.Core.Tests
await context.WriteResponseHeadersAsync(headers);
Assert.Fail();
}
catch (InvalidOperationException expected)
catch (InvalidOperationException)
{
}
return "PASS";
@ -178,7 +178,7 @@ namespace Grpc.Core.Tests
await context.WriteResponseHeadersAsync(headers);
Assert.Fail();
}
catch (InvalidOperationException expected)
catch (InvalidOperationException)
{
}
await responseStream.WriteAsync("B");

@ -50,13 +50,14 @@ namespace Grpc.Core.Tests
[Test]
public void BlockingCallInServerHandlerDoesNotDeadlock()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
int recursionDepth = int.Parse(request);
if (recursionDepth <= 0) {
return "SUCCESS";
return Task.FromResult("SUCCESS");
}
return Calls.BlockingUnaryCall(helper.CreateUnaryCall(), (recursionDepth - 1).ToString());
var response = Calls.BlockingUnaryCall(helper.CreateUnaryCall(), (recursionDepth - 1).ToString());
return Task.FromResult(response);
});
int maxRecursionDepth = Environment.ProcessorCount * 2; // make sure we have more pending blocking calls than threads in GrpcThreadPool
@ -66,12 +67,12 @@ namespace Grpc.Core.Tests
[Test]
public void HandlerDoesNotRunOnGrpcThread()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
if (IsRunningOnGrpcThreadPool()) {
return "Server handler should not run on gRPC threadpool thread.";
return Task.FromResult("Server handler should not run on gRPC threadpool thread.");
}
return request;
return Task.FromResult(request);
});
Assert.AreEqual("ABC", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "ABC"));
@ -80,9 +81,9 @@ namespace Grpc.Core.Tests
[Test]
public async Task ContinuationDoesNotRunOnGrpcThread()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
return request;
return Task.FromResult(request);
});
await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "ABC");

@ -57,10 +57,10 @@ namespace Grpc.Core.Tests
[Test]
public void InfiniteDeadline()
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
Assert.AreEqual(DateTime.MaxValue, context.Deadline);
return "PASS";
return Task.FromResult("PASS");
});
// no deadline specified, check server sees infinite deadline
@ -75,13 +75,13 @@ namespace Grpc.Core.Tests
{
var clientDeadline = DateTime.UtcNow + TimeSpan.FromDays(7);
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
helper.UnaryHandler = new UnaryServerMethod<string, string>((request, context) =>
{
// A fairly relaxed check that the deadline set by client and deadline seen by server
// are in agreement. C core takes care of the work with transferring deadline over the wire,
// so we don't need an exact check here.
Assert.IsTrue(Math.Abs((clientDeadline - context.Deadline).TotalMilliseconds) < 5000);
return "PASS";
return Task.FromResult("PASS");
});
Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: clientDeadline)), "abc");
}

@ -18,6 +18,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -74,7 +74,10 @@ namespace Grpc.Core.Internal
private AuthProperty PtrToAuthProperty(IntPtr authPropertyPtr)
{
#pragma warning disable 0618
// We need to use the obsolete non-generic version of Marshal.PtrToStructure, because the generic version is not available in net45
var nativeAuthProperty = (NativeAuthProperty) Marshal.PtrToStructure(authPropertyPtr, typeof(NativeAuthProperty));
#pragma warning restore 0618
var name = Marshal.PtrToStringAnsi(nativeAuthProperty.Name);
var valueBytes = new byte[(int) nativeAuthProperty.ValueLength];
Marshal.Copy(nativeAuthProperty.Value, valueBytes, 0, (int)nativeAuthProperty.ValueLength);

@ -9,6 +9,7 @@
<OutputType>Exe</OutputType>
<PackageId>Grpc.Examples.MathClient</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -9,6 +9,7 @@
<OutputType>Exe</OutputType>
<PackageId>Grpc.Examples.MathServer</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -10,6 +10,7 @@
<PackageId>Grpc.Examples.Tests</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -37,7 +37,7 @@ namespace Math.Tests
Channel channel;
Math.MathClient client;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
@ -51,7 +51,7 @@ namespace Math.Tests
client = new Math.MathClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();
@ -130,7 +130,7 @@ namespace Math.Tests
}
[Test]
public async Task FibWithDeadline()
public void FibWithDeadline()
{
using (var call = client.Fib(new FibArgs { Limit = 0 },
deadline: DateTime.UtcNow.AddMilliseconds(500)))

@ -8,6 +8,7 @@
<AssemblyName>Grpc.Examples</AssemblyName>
<PackageId>Grpc.Examples</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -52,9 +52,10 @@ namespace Math
public override async Task<Num> Sum(IAsyncStreamReader<Num> requestStream, ServerCallContext context)
{
long sum = 0;
await requestStream.ForEachAsync(async num =>
await requestStream.ForEachAsync(num =>
{
sum += num.Num_;
return TaskUtils.CompletedTask;
});
return new Num { Num_ = sum };
}

@ -10,6 +10,7 @@
<PackageId>Grpc.HealthCheck.Tests</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -37,7 +37,7 @@ namespace Grpc.HealthCheck.Tests
Grpc.Health.V1.Health.HealthClient client;
Grpc.HealthCheck.HealthServiceImpl serviceImpl;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
serviceImpl = new HealthServiceImpl();
@ -54,7 +54,7 @@ namespace Grpc.HealthCheck.Tests
client = new Grpc.Health.V1.Health.HealthClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();

@ -18,6 +18,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -10,6 +10,7 @@
<PackageId>Grpc.IntegrationTesting.Client</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -11,6 +11,7 @@
<ServerGarbageCollection>true</ServerGarbageCollection>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -10,6 +10,7 @@
<PackageId>Grpc.IntegrationTesting.Server</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -10,6 +10,7 @@
<PackageId>Grpc.IntegrationTesting.StressClient</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -28,86 +28,89 @@ namespace Grpc.Testing {
"c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASISChBDbG9zZWRMb29w",
"UGFyYW1zInsKCkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5n",
"cnBjLnRlc3RpbmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiAB",
"KAsyGy5ncnBjLnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAQgYKBGxvYWQiQwoO",
"KAsyGy5ncnBjLnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAQgYKBGxvYWQiVgoO",
"U2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2VydmVy",
"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luZy5TY2VuYXJpbxIu",
"CglsYXRlbmNpZXMYAiABKAsyGy5ncnBjLnRlc3RpbmcuSGlzdG9ncmFtRGF0",
"YRIvCgxjbGllbnRfc3RhdHMYAyADKAsyGS5ncnBjLnRlc3RpbmcuQ2xpZW50",
"U3RhdHMSLwoMc2VydmVyX3N0YXRzGAQgAygLMhkuZ3JwYy50ZXN0aW5nLlNl",
"cnZlclN0YXRzEhQKDHNlcnZlcl9jb3JlcxgFIAMoBRI0CgdzdW1tYXJ5GAYg",
"ASgLMiMuZ3JwYy50ZXN0aW5nLlNjZW5hcmlvUmVzdWx0U3VtbWFyeRIWCg5j",
"bGllbnRfc3VjY2VzcxgHIAMoCBIWCg5zZXJ2ZXJfc3VjY2VzcxgIIAMoCBI5",
"Cg9yZXF1ZXN0X3Jlc3VsdHMYCSADKAsyIC5ncnBjLnRlc3RpbmcuUmVxdWVz",
"dFJlc3VsdENvdW50KkEKCkNsaWVudFR5cGUSDwoLU1lOQ19DTElFTlQQABIQ",
"CgxBU1lOQ19DTElFTlQQARIQCgxPVEhFUl9DTElFTlQQAipbCgpTZXJ2ZXJU",
"eXBlEg8KC1NZTkNfU0VSVkVSEAASEAoMQVNZTkNfU0VSVkVSEAESGAoUQVNZ",
"TkNfR0VORVJJQ19TRVJWRVIQAhIQCgxPVEhFUl9TRVJWRVIQAypyCgdScGNU",
"eXBlEgkKBVVOQVJZEAASDQoJU1RSRUFNSU5HEAESGQoVU1RSRUFNSU5HX0ZS",
"T01fQ0xJRU5UEAISGQoVU1RSRUFNSU5HX0ZST01fU0VSVkVSEAMSFwoTU1RS",
"RUFNSU5HX0JPVEhfV0FZUxAEYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson" }, new[]{ "Load" }, null, null),
new pbr::GeneratedClrTypeInfo(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", "CredType" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ChannelArg), global::Grpc.Testing.ChannelArg.Parser, new[]{ "Name", "StrValue", "IntValue" }, new[]{ "Value" }, 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", "ChannelArgs", "ThreadsPerCq", "MessagesPerStream" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Mark), global::Grpc.Testing.Mark.Parser, new[]{ "Reset" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ClientArgs), global::Grpc.Testing.ClientArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig", "CoreList", "OtherServerApi", "ThreadsPerCq", "ResourceQuotaSize" }, 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", "ThreadsPerCq", "ResourceQuotaSize", "ChannelArgs" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerArgs), global::Grpc.Testing.ServerArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null),
@ -115,7 +118,7 @@ namespace Grpc.Testing {
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, 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::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Scenarios), global::Grpc.Testing.Scenarios.Parser, new[]{ "Scenarios_" }, 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", "ServerCpuUsage", "SuccessfulRequestsPerSecond", "FailedRequestsPerSecond", "ClientPollsPerRequest", "ServerPollsPerRequest" }, 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", "ServerCpuUsage", "SuccessfulRequestsPerSecond", "FailedRequestsPerSecond", "ClientPollsPerRequest", "ServerPollsPerRequest", "ServerQueriesPerCpuSec", "ClientQueriesPerCpuSec" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ScenarioResult), global::Grpc.Testing.ScenarioResult.Parser, new[]{ "Scenario", "Latencies", "ClientStats", "ServerStats", "ServerCores", "Summary", "ClientSuccess", "ServerSuccess", "RequestResults" }, null, null, null)
}));
}
@ -589,6 +592,7 @@ namespace Grpc.Testing {
public SecurityParams(SecurityParams other) : this() {
useTestCa_ = other.useTestCa_;
serverHostOverride_ = other.serverHostOverride_;
credType_ = other.credType_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -618,6 +622,17 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "cred_type" field.</summary>
public const int CredTypeFieldNumber = 3;
private string credType_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string CredType {
get { return credType_; }
set {
credType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as SecurityParams);
@ -633,6 +648,7 @@ namespace Grpc.Testing {
}
if (UseTestCa != other.UseTestCa) return false;
if (ServerHostOverride != other.ServerHostOverride) return false;
if (CredType != other.CredType) return false;
return true;
}
@ -641,6 +657,7 @@ namespace Grpc.Testing {
int hash = 1;
if (UseTestCa != false) hash ^= UseTestCa.GetHashCode();
if (ServerHostOverride.Length != 0) hash ^= ServerHostOverride.GetHashCode();
if (CredType.Length != 0) hash ^= CredType.GetHashCode();
return hash;
}
@ -659,6 +676,10 @@ namespace Grpc.Testing {
output.WriteRawTag(18);
output.WriteString(ServerHostOverride);
}
if (CredType.Length != 0) {
output.WriteRawTag(26);
output.WriteString(CredType);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -670,6 +691,9 @@ namespace Grpc.Testing {
if (ServerHostOverride.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerHostOverride);
}
if (CredType.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(CredType);
}
return size;
}
@ -684,6 +708,9 @@ namespace Grpc.Testing {
if (other.ServerHostOverride.Length != 0) {
ServerHostOverride = other.ServerHostOverride;
}
if (other.CredType.Length != 0) {
CredType = other.CredType;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -702,6 +729,10 @@ namespace Grpc.Testing {
ServerHostOverride = input.ReadString();
break;
}
case 26: {
CredType = input.ReadString();
break;
}
}
}
}
@ -1945,6 +1976,7 @@ namespace Grpc.Testing {
otherServerApi_ = other.otherServerApi_;
threadsPerCq_ = other.threadsPerCq_;
resourceQuotaSize_ = other.resourceQuotaSize_;
channelArgs_ = other.channelArgs_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2088,6 +2120,16 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "channel_args" field.</summary>
public const int ChannelArgsFieldNumber = 1002;
private static readonly pb::FieldCodec<global::Grpc.Testing.ChannelArg> _repeated_channelArgs_codec
= pb::FieldCodec.ForMessage(8018, global::Grpc.Testing.ChannelArg.Parser);
private readonly pbc::RepeatedField<global::Grpc.Testing.ChannelArg> channelArgs_ = new pbc::RepeatedField<global::Grpc.Testing.ChannelArg>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Grpc.Testing.ChannelArg> ChannelArgs {
get { return channelArgs_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ServerConfig);
@ -2111,6 +2153,7 @@ namespace Grpc.Testing {
if (OtherServerApi != other.OtherServerApi) return false;
if (ThreadsPerCq != other.ThreadsPerCq) return false;
if (ResourceQuotaSize != other.ResourceQuotaSize) return false;
if(!channelArgs_.Equals(other.channelArgs_)) return false;
return true;
}
@ -2127,6 +2170,7 @@ namespace Grpc.Testing {
if (OtherServerApi.Length != 0) hash ^= OtherServerApi.GetHashCode();
if (ThreadsPerCq != 0) hash ^= ThreadsPerCq.GetHashCode();
if (ResourceQuotaSize != 0) hash ^= ResourceQuotaSize.GetHashCode();
hash ^= channelArgs_.GetHashCode();
return hash;
}
@ -2174,6 +2218,7 @@ namespace Grpc.Testing {
output.WriteRawTag(200, 62);
output.WriteInt32(ResourceQuotaSize);
}
channelArgs_.WriteTo(output, _repeated_channelArgs_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2207,6 +2252,7 @@ namespace Grpc.Testing {
if (ResourceQuotaSize != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(ResourceQuotaSize);
}
size += channelArgs_.CalculateSize(_repeated_channelArgs_codec);
return size;
}
@ -2249,6 +2295,7 @@ namespace Grpc.Testing {
if (other.ResourceQuotaSize != 0) {
ResourceQuotaSize = other.ResourceQuotaSize;
}
channelArgs_.Add(other.channelArgs_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2306,6 +2353,10 @@ namespace Grpc.Testing {
ResourceQuotaSize = input.ReadInt32();
break;
}
case 8018: {
channelArgs_.AddEntriesFrom(input, _repeated_channelArgs_codec);
break;
}
}
}
}
@ -3489,6 +3540,8 @@ namespace Grpc.Testing {
failedRequestsPerSecond_ = other.failedRequestsPerSecond_;
clientPollsPerRequest_ = other.clientPollsPerRequest_;
serverPollsPerRequest_ = other.serverPollsPerRequest_;
serverQueriesPerCpuSec_ = other.serverQueriesPerCpuSec_;
clientQueriesPerCpuSec_ = other.clientQueriesPerCpuSec_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -3702,6 +3755,31 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "server_queries_per_cpu_sec" field.</summary>
public const int ServerQueriesPerCpuSecFieldNumber = 17;
private double serverQueriesPerCpuSec_;
/// <summary>
/// Queries per CPU-sec over all servers or clients
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double ServerQueriesPerCpuSec {
get { return serverQueriesPerCpuSec_; }
set {
serverQueriesPerCpuSec_ = value;
}
}
/// <summary>Field number for the "client_queries_per_cpu_sec" field.</summary>
public const int ClientQueriesPerCpuSecFieldNumber = 18;
private double clientQueriesPerCpuSec_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double ClientQueriesPerCpuSec {
get { return clientQueriesPerCpuSec_; }
set {
clientQueriesPerCpuSec_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ScenarioResultSummary);
@ -3731,6 +3809,8 @@ namespace Grpc.Testing {
if (FailedRequestsPerSecond != other.FailedRequestsPerSecond) return false;
if (ClientPollsPerRequest != other.ClientPollsPerRequest) return false;
if (ServerPollsPerRequest != other.ServerPollsPerRequest) return false;
if (ServerQueriesPerCpuSec != other.ServerQueriesPerCpuSec) return false;
if (ClientQueriesPerCpuSec != other.ClientQueriesPerCpuSec) return false;
return true;
}
@ -3753,6 +3833,8 @@ namespace Grpc.Testing {
if (FailedRequestsPerSecond != 0D) hash ^= FailedRequestsPerSecond.GetHashCode();
if (ClientPollsPerRequest != 0D) hash ^= ClientPollsPerRequest.GetHashCode();
if (ServerPollsPerRequest != 0D) hash ^= ServerPollsPerRequest.GetHashCode();
if (ServerQueriesPerCpuSec != 0D) hash ^= ServerQueriesPerCpuSec.GetHashCode();
if (ClientQueriesPerCpuSec != 0D) hash ^= ClientQueriesPerCpuSec.GetHashCode();
return hash;
}
@ -3827,6 +3909,14 @@ namespace Grpc.Testing {
output.WriteRawTag(129, 1);
output.WriteDouble(ServerPollsPerRequest);
}
if (ServerQueriesPerCpuSec != 0D) {
output.WriteRawTag(137, 1);
output.WriteDouble(ServerQueriesPerCpuSec);
}
if (ClientQueriesPerCpuSec != 0D) {
output.WriteRawTag(145, 1);
output.WriteDouble(ClientQueriesPerCpuSec);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -3880,6 +3970,12 @@ namespace Grpc.Testing {
if (ServerPollsPerRequest != 0D) {
size += 2 + 8;
}
if (ServerQueriesPerCpuSec != 0D) {
size += 2 + 8;
}
if (ClientQueriesPerCpuSec != 0D) {
size += 2 + 8;
}
return size;
}
@ -3936,6 +4032,12 @@ namespace Grpc.Testing {
if (other.ServerPollsPerRequest != 0D) {
ServerPollsPerRequest = other.ServerPollsPerRequest;
}
if (other.ServerQueriesPerCpuSec != 0D) {
ServerQueriesPerCpuSec = other.ServerQueriesPerCpuSec;
}
if (other.ClientQueriesPerCpuSec != 0D) {
ClientQueriesPerCpuSec = other.ClientQueriesPerCpuSec;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -4010,6 +4112,14 @@ namespace Grpc.Testing {
ServerPollsPerRequest = input.ReadDouble();
break;
}
case 137: {
ServerQueriesPerCpuSec = input.ReadDouble();
break;
}
case 145: {
ClientQueriesPerCpuSec = input.ReadDouble();
break;
}
}
}
}

@ -42,7 +42,7 @@ namespace Grpc.IntegrationTesting
Channel channel;
TestService.TestServiceClient client;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
@ -57,7 +57,7 @@ namespace Grpc.IntegrationTesting
client = new TestService.TestServiceClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();
@ -108,7 +108,7 @@ namespace Grpc.IntegrationTesting
private class CustomErrorDetailsTestServiceImpl : TestService.TestServiceBase
{
public override async Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context)
public override Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context)
{
try
{

@ -65,7 +65,7 @@ namespace Grpc.IntegrationTesting
}
[Test]
public async Task UnimplementedByDefault_ClientStreaming()
public void UnimplementedByDefault_ClientStreaming()
{
var call = client.StreamingInputCall();
@ -74,7 +74,7 @@ namespace Grpc.IntegrationTesting
}
[Test]
public async Task UnimplementedByDefault_ServerStreamingCall()
public void UnimplementedByDefault_ServerStreamingCall()
{
var call = client.StreamingOutputCall(new StreamingOutputCallRequest());
@ -83,7 +83,7 @@ namespace Grpc.IntegrationTesting
}
[Test]
public async Task UnimplementedByDefault_DuplexStreamingCall()
public void UnimplementedByDefault_DuplexStreamingCall()
{
var call = client.FullDuplexCall();

@ -10,6 +10,7 @@
<PackageId>Grpc.IntegrationTesting</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -38,7 +38,7 @@ namespace Grpc.IntegrationTesting
Channel channel;
TestService.TestServiceClient client;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
@ -58,7 +58,7 @@ namespace Grpc.IntegrationTesting
client = new TestService.TestServiceClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();

@ -21,6 +21,7 @@
// Currently, 'Gauge' (i.e a metric that represents the measured value of
// something at an instant of time) is the only metric type supported by the
// service.
#pragma warning disable 1591
#region Designer generated code
using System;

@ -35,7 +35,7 @@ namespace Grpc.IntegrationTesting
{
IServerRunner serverRunner;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
var serverConfig = new ServerConfig
@ -45,7 +45,7 @@ namespace Grpc.IntegrationTesting
serverRunner = ServerRunners.CreateStarted(serverConfig);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
serverRunner.StopAsync().Wait();

@ -17,6 +17,7 @@
//
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
#pragma warning disable 1591
#region Designer generated code
using System;

@ -41,7 +41,7 @@ namespace Grpc.IntegrationTesting
Channel channel;
TestService.TestServiceClient client;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
var rootCert = File.ReadAllText(TestCredentials.ClientCertAuthorityPath);
@ -69,7 +69,7 @@ namespace Grpc.IntegrationTesting
client = new TestService.TestServiceClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();
@ -94,15 +94,15 @@ namespace Grpc.IntegrationTesting
private class SslCredentialsTestServiceImpl : TestService.TestServiceBase
{
public override async Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context)
public override Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context)
{
return new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) };
return Task.FromResult(new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) });
}
public override async Task<StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<StreamingInputCallRequest> requestStream, ServerCallContext context)
{
var authContext = context.AuthContext;
await requestStream.ForEachAsync(async request => {});
await requestStream.ForEachAsync(request => TaskUtils.CompletedTask);
Assert.IsTrue(authContext.IsPeerAuthenticated);
Assert.AreEqual("x509_subject_alternative_name", authContext.PeerIdentityPropertyName);

@ -18,6 +18,7 @@
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -63,9 +63,10 @@ namespace Grpc.Testing
await EnsureEchoMetadataAsync(context);
int sum = 0;
await requestStream.ForEachAsync(async request =>
await requestStream.ForEachAsync(request =>
{
sum += request.Payload.Body.Length;
return TaskUtils.CompletedTask;
});
return new StreamingInputCallResponse { AggregatedPayloadSize = sum };
}
@ -85,7 +86,7 @@ namespace Grpc.Testing
});
}
public override async Task HalfDuplexCall(IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream, ServerCallContext context)
public override Task HalfDuplexCall(IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream, ServerCallContext context)
{
throw new NotImplementedException();
}

@ -10,6 +10,7 @@
<PackageId>Grpc.Microbenchmarks</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -10,6 +10,7 @@
<PackageId>Grpc.Reflection.Tests</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -38,7 +38,7 @@ namespace Grpc.Reflection.Tests
ServerReflection.ServerReflectionClient client;
ReflectionServiceImpl serviceImpl;
[TestFixtureSetUp]
[OneTimeSetUp]
public void Init()
{
serviceImpl = new ReflectionServiceImpl(ServerReflection.Descriptor);
@ -55,7 +55,7 @@ namespace Grpc.Reflection.Tests
client = new ServerReflection.ServerReflectionClient(channel);
}
[TestFixtureTearDown]
[OneTimeTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();

@ -18,6 +18,7 @@
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>

@ -17,6 +17,7 @@
//
// Service exported by server reflection
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -60,6 +60,9 @@ namespace Grpc.Reflection
{
}
/// <summary>
/// Processes a stream of server reflection requests.
/// </summary>
public override async Task ServerReflectionInfo(IAsyncStreamReader<ServerReflectionRequest> requestStream, IServerStreamWriter<ServerReflectionResponse> responseStream, ServerCallContext context)
{
while (await requestStream.MoveNext())

@ -0,0 +1,5 @@
{
"sdk": {
"version": "1.0.0"
}
}
Loading…
Cancel
Save