diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-05-03 15:29:45 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-05-03 15:29:45 -0700 |
commit | f21f465bceaca0bfd23a377d56fa19fa4794fede (patch) | |
tree | 2335a0efe6f4f6752f8c7d06986ec2ec9e602bf3 /src/csharp/Grpc.Core.Tests | |
parent | 2624cfb511d54b7d41f9eeab4073d2e6c9def9ad (diff) |
make AsyncCallServerTest finish correctly
Diffstat (limited to 'src/csharp/Grpc.Core.Tests')
-rw-r--r-- | src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index 169de5a780..0b6981f871 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -54,7 +54,14 @@ namespace Grpc.Core.Internal.Tests public void Init() { var environment = GrpcEnvironment.AddRef(); - server = new Server(); + + // Create a fake server just so we have an instance to refer to. + // The server won't actually be used at all. + server = new Server() + { + Ports = { { "localhost", 0, ServerCredentials.Insecure } } + }; + server.Start(); fakeCall = new FakeNativeCall(); asyncCallServer = new AsyncCallServer<string, string>( @@ -67,6 +74,7 @@ namespace Grpc.Core.Internal.Tests [TearDown] public void Cleanup() { + server.ShutdownAsync().Wait(); GrpcEnvironment.Release(); } |