Skip to content
Snippets Groups Projects
Commit 09d2f55c authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

eliminate crosstalk between C# tests

parent f517fad0
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,8 @@ namespace Grpc.Core.Tests
{
if (server == null)
{
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { serviceDefinition },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
......
......@@ -55,7 +55,8 @@ namespace Math.Tests
[TestFixtureSetUp]
public void Init()
{
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { Math.BindService(new MathServiceImpl()) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
......
......@@ -57,7 +57,8 @@ namespace Grpc.HealthCheck.Tests
{
serviceImpl = new HealthServiceImpl();
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { Grpc.Health.V1.Health.BindService(serviceImpl) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
......
......@@ -54,7 +54,8 @@ namespace Grpc.IntegrationTesting
[SetUp]
public void Init()
{
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { TestService.BindService(new UnimplementedTestServiceImpl()) },
Ports = { { Host, ServerPort.PickUnused, SslServerCredentials.Insecure } }
......
......@@ -56,7 +56,8 @@ namespace Grpc.IntegrationTesting
[TestFixtureSetUp]
public void Init()
{
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { TestService.BindService(new TestServiceImpl()) },
Ports = { { Host, ServerPort.PickUnused, TestCredentials.CreateSslServerCredentials() } }
......
......@@ -56,7 +56,8 @@ namespace Grpc.IntegrationTesting
[SetUp]
public void Init()
{
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { TestService.BindService(new FakeTestService()) },
Ports = { { Host, ServerPort.PickUnused, TestCredentials.CreateSslServerCredentials() } }
......
......@@ -67,7 +67,8 @@ namespace Grpc.IntegrationTesting
var serverCredentials = new SslServerCredentials(new[] { keyCertPair }, rootCert, true);
var clientCredentials = new SslCredentials(rootCert, keyCertPair);
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { TestService.BindService(new SslCredentialsTestServiceImpl()) },
Ports = { { Host, ServerPort.PickUnused, serverCredentials } }
......
......@@ -58,7 +58,8 @@ namespace Grpc.Reflection.Tests
{
serviceImpl = new ReflectionServiceImpl(ServerReflection.Descriptor);
server = new Server
// Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755
server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) })
{
Services = { ServerReflection.BindService(serviceImpl) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment