aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests/ServerTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Core.Tests/ServerTest.cs')
-rw-r--r--src/csharp/Grpc.Core.Tests/ServerTest.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs
index 5f7144611e..3b51aa6330 100644
--- a/src/csharp/Grpc.Core.Tests/ServerTest.cs
+++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs
@@ -95,6 +95,14 @@ namespace Grpc.Core.Tests
}
[Test]
+ public void UnstartedServerCanBeShutdown()
+ {
+ var server = new Server();
+ server.ShutdownAsync().Wait();
+ Assert.Throws(typeof(InvalidOperationException), () => server.Start());
+ }
+
+ [Test]
public void UnstartedServerDoesNotPreventShutdown()
{
// just create a server, don't start it, and make sure it doesn't prevent shutdown.