Skip to content

Commit

Permalink
Fix HTTP/3 test errors on .NET 6
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Apr 29, 2024
1 parent c9c902c commit 8822fe8
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions test/FunctionalTests/Client/ClientFactoryTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#region Copyright notice and license
#region Copyright notice and license

// Copyright 2019 The gRPC Authors
//
Expand Down Expand Up @@ -81,7 +81,7 @@ Task<HelloReply> UnaryCall(HelloRequest request, ServerCallContext context)
Assert.AreEqual("Hello world", response2.Message);
}

#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[Test]
[RequireHttp3]
public async Task ClientFactory_Http3_Success()
Expand Down
2 changes: 1 addition & 1 deletion test/FunctionalTests/Client/ConnectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Task<HelloReply> UnaryUds(HelloRequest request, ServerCallContext context)
}
#endif

#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[Test]
[RequireHttp3]
public async Task Http3()
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Client/AuthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class AuthTests : GrpcWebFunctionalTestBase
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Client/ClientFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class ClientFactoryTests : GrpcWebFunctionalTestBase
Expand Down
2 changes: 1 addition & 1 deletion test/FunctionalTests/Web/Client/ConnectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private GrpcChannel CreateGrpcWebChannel(TestServerEndpointName endpointName, Ve
[TestCase(TestServerEndpointName.Http2WithTls, "1.1", false)]
#endif
[TestCase(TestServerEndpointName.Http2WithTls, null, true)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestCase(TestServerEndpointName.Http3WithTls, null, true)]
#endif
public async Task SendValidRequest_WithConnectionOptions(TestServerEndpointName endpointName, string? version, bool success)
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Client/IssueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class IssueTests : GrpcWebFunctionalTestBase
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Client/ServerStreamingMethodTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class ServerStreamingMethodTests : GrpcWebFunctionalTestBase
Expand Down
8 changes: 4 additions & 4 deletions test/FunctionalTests/Web/Client/TrailerMetadataTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#region Copyright notice and license
#region Copyright notice and license

// Copyright 2019 The gRPC Authors
//
Expand Down Expand Up @@ -26,16 +26,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class TrailerMetadataTests : GrpcWebFunctionalTestBase
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Client/UnaryMethodTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Client;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class UnaryMethodTests : GrpcWebFunctionalTestBase
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Server/DeadlineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Server;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class DeadlineTests : GrpcWebFunctionalTestBase
Expand Down
6 changes: 3 additions & 3 deletions test/FunctionalTests/Web/Server/UnaryMethodTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ namespace Grpc.AspNetCore.FunctionalTests.Web.Server;

[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWeb, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http1)]
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.GrpcWebText, TestServerEndpointName.Http3WithTls)]
#endif
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http2)]
#if NET6_0_OR_GREATER
#if NET7_0_OR_GREATER
[TestFixture(GrpcTestMode.Grpc, TestServerEndpointName.Http3WithTls)]
#endif
public class UnaryMethodTests : GrpcWebFunctionalTestBase
Expand Down

0 comments on commit 8822fe8

Please sign in to comment.