From f21f465bceaca0bfd23a377d56fa19fa4794fede Mon Sep 17 00:00:00 2001
From: Jan Tattermusch <jtattermusch@google.com>
Date: Tue, 3 May 2016 15:29:45 -0700
Subject: [PATCH] make AsyncCallServerTest finish correctly

---
 .../Grpc.Core.Tests/Internal/AsyncCallServerTest.cs    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

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();
         }
 
-- 
GitLab