fixing unknown method call handler on server

pull/578/head
Jan Tattermusch 10 years ago
parent fa21673cf8
commit 37afb9ab2b
  1. 18
      src/csharp/GrpcCore/ServerCallHandler.cs
  2. 2
      src/csharp/GrpcCoreTests/ClientServerTest.cs

@ -109,12 +109,28 @@ namespace Google.GRPC.Core
asyncCall.InitializeServer(call); asyncCall.InitializeServer(call);
var finishedTask = asyncCall.ServerSideUnaryRequestCallAsync(); var finishedTask = asyncCall.ServerSideStreamingRequestCallAsync(new NullObserver<byte[]>());
asyncCall.SendStatusFromServerAsync(new Status(StatusCode.GRPC_STATUS_UNIMPLEMENTED, "No such method.")).Wait(); asyncCall.SendStatusFromServerAsync(new Status(StatusCode.GRPC_STATUS_UNIMPLEMENTED, "No such method.")).Wait();
finishedTask.Wait(); finishedTask.Wait();
} }
} }
internal class NullObserver<T> : IObserver<T>
{
public void OnCompleted()
{
}
public void OnError(Exception error)
{
}
public void OnNext(T value)
{
}
}
} }

@ -85,8 +85,6 @@ namespace Google.GRPC.Core.Tests
} }
server.ShutdownAsync().Wait(); server.ShutdownAsync().Wait();
GrpcEnvironment.Shutdown();
} }
[Test] [Test]

Loading…
Cancel
Save