Fix warnings in Grpc.Examples

pull/12127/head
Jan Tattermusch 8 years ago
parent aa135cedf9
commit b8c77c59c5
  1. 1
      src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj
  2. 1
      src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj
  3. 1
      src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
  4. 6
      src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
  5. 1
      src/csharp/Grpc.Examples/Grpc.Examples.csproj
  6. 3
      src/csharp/Grpc.Examples/MathServiceImpl.cs
  7. 1
      src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
  8. 4
      src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
  9. 1
      src/csharp/Grpc.Microbenchmarks/Grpc.Microbenchmarks.csproj
  10. 1
      src/csharp/Grpc.Reflection.Tests/Grpc.Reflection.Tests.csproj
  11. 4
      src/csharp/Grpc.Reflection.Tests/ReflectionClientServerTest.cs

@ -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>

@ -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();

@ -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();

Loading…
Cancel
Save