diff options
author | Yuchen Zeng <zyc@google.com> | 2016-06-10 15:46:23 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-06-10 15:46:23 -0700 |
commit | ed81a88c3e13aaab4a3cb89ad5bcc0cf1f336342 (patch) | |
tree | 959ad9b928d82256031cb651bb8c73948d9401ef /src/csharp/Grpc.Core.Tests | |
parent | beaa35724c4eb67eb5f890d6f66e0fd3b2f50aaa (diff) | |
parent | a9e3ea38150a0e8adf0594b7ffac1441244e0142 (diff) |
Merge remote-tracking branch 'upstream/master' into log_format_check
Diffstat (limited to 'src/csharp/Grpc.Core.Tests')
-rw-r--r-- | src/csharp/Grpc.Core.Tests/ServerTest.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs index fa693162ad..3b51aa6330 100644 --- a/src/csharp/Grpc.Core.Tests/ServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs @@ -93,5 +93,20 @@ namespace Grpc.Core.Tests server.ShutdownAsync().Wait(); } + + [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. + var server = new Server(); + } } } |