diff --git a/src/Grpc/test/InteropTests/InteropTests.cs b/src/Grpc/test/InteropTests/InteropTests.cs index 2a9a1f66d771..4fce98ff786d 100644 --- a/src/Grpc/test/InteropTests/InteropTests.cs +++ b/src/Grpc/test/InteropTests/InteropTests.cs @@ -13,6 +13,8 @@ namespace InteropTests { + // All interop test cases, minus GCE authentication specific tests. + // Tests are separate methods so that they can be quarantined separately. public class InteropTests { private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30); @@ -25,10 +27,62 @@ public InteropTests(ITestOutputHelper output) _output = output; } - [Theory] + [Fact] + public Task EmptyUnary() => InteropTestCase("empty_unary"); + + [Fact] + public Task LargeUnary() => InteropTestCase("large_unary"); + + [Fact] + public Task ClientStreaming() => InteropTestCase("client_streaming"); + + [Fact] + public Task ServerStreaming() => InteropTestCase("server_streaming"); + + [Fact] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/22101")] - [MemberData(nameof(TestCaseData))] - public async Task InteropTestCase(string name) + public Task PingPong() => InteropTestCase("ping_pong"); + + [Fact] + public Task EmptyStream() => InteropTestCase("empty_stream"); + + [Fact] + public Task CancelAfterBegin() => InteropTestCase("cancel_after_begin"); + + [Fact] + public Task CancelAfterFirstResponse() => InteropTestCase("cancel_after_first_response"); + + [Fact] + public Task TimeoutOnSleepingServer() => InteropTestCase("timeout_on_sleeping_server"); + + [Fact] + public Task CustomMetadata() => InteropTestCase("custom_metadata"); + + [Fact] + public Task StatusCodeAndMessage() => InteropTestCase("status_code_and_message"); + + [Fact] + public Task SpecialStatusMessage() => InteropTestCase("special_status_message"); + + [Fact] + public Task UnimplementedService() => InteropTestCase("unimplemented_service"); + + [Fact] + public Task UnimplementedMethod() => InteropTestCase("unimplemented_method"); + + [Fact] + public Task ClientCompressedUnary() => InteropTestCase("client_compressed_unary"); + + [Fact] + public Task ClientCompressedStreaming() => InteropTestCase("client_compressed_streaming"); + + [Fact] + public Task ServerCompressedUnary() => InteropTestCase("server_compressed_unary"); + + [Fact] + public Task ServerCompressedStreaming() => InteropTestCase("server_compressed_streaming"); + + private async Task InteropTestCase(string name) { using (var serverProcess = new WebsiteProcess(_serverPath, _output)) { @@ -44,33 +98,5 @@ public async Task InteropTestCase(string name) } } } - - #region TestData - // All interop test cases, minus GCE authentication specific tests - private static string[] AllTests = new string[] - { - "empty_unary", - "large_unary", - "client_streaming", - "server_streaming", - "ping_pong", - "empty_stream", - - "cancel_after_begin", - "cancel_after_first_response", - "timeout_on_sleeping_server", - "custom_metadata", - "status_code_and_message", - "special_status_message", - "unimplemented_service", - "unimplemented_method", - "client_compressed_unary", - "client_compressed_streaming", - "server_compressed_unary", - "server_compressed_streaming" - }; - - public static IEnumerable TestCaseData => AllTests.Select(t => new object[] { t }); - #endregion } }