aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests
diff options
context:
space:
mode:
authorGravatar Mehrdad Afshari <mmx@google.com>2018-02-12 01:18:47 -0800
committerGravatar Mehrdad Afshari <mmx@google.com>2018-02-21 18:30:19 -0800
commit0126b1c6e93c70f7b55d54765e3b32d926065a61 (patch)
tree9a6115bb15166b759259db0166fd9c95fae74dfe /src/csharp/Grpc.Core.Tests
parent6c3cb2299124773abe4b7039b94a976c5552c432 (diff)
Simplify ServerInterceptorTest to leverage GenericInterceptor
Diffstat (limited to 'src/csharp/Grpc.Core.Tests')
-rw-r--r--src/csharp/Grpc.Core.Tests/Interceptors/ServerInterceptorTest.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core.Tests/Interceptors/ServerInterceptorTest.cs b/src/csharp/Grpc.Core.Tests/Interceptors/ServerInterceptorTest.cs
index 57ea3e37d5..a602d081ae 100644
--- a/src/csharp/Grpc.Core.Tests/Interceptors/ServerInterceptorTest.cs
+++ b/src/csharp/Grpc.Core.Tests/Interceptors/ServerInterceptorTest.cs
@@ -34,7 +34,7 @@ namespace Grpc.Core.Interceptors.Tests
{
const string Host = "127.0.0.1";
- private class AddRequestHeaderServerInterceptor : Interceptor
+ private class AddRequestHeaderServerInterceptor : GenericInterceptor
{
readonly Metadata.Entry header;
@@ -43,10 +43,10 @@ namespace Grpc.Core.Interceptors.Tests
this.header = new Metadata.Entry(key, value);
}
- public override async Task<TResponse> UnaryServerHandler<TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod<TRequest, TResponse> continuation)
+ protected override Task<ServerCallArbitrator<TRequest, TResponse>> InterceptHandler<TRequest, TResponse>(ServerCallContext context, bool clientStreaming, bool serverStreaming, TRequest request)
{
context.RequestHeaders.Add(header);
- return await continuation(request, context).ConfigureAwait(false);
+ return Task.FromResult<ServerCallArbitrator<TRequest, TResponse>>(null);
}
public Metadata.Entry Header