Make sure the SO_REUSEPORT is off

pull/23632/head
Lidi Zheng 5 years ago
parent 217dade003
commit b9b33c06eb
  1. 2
      src/python/grpcio_tests/tests/unit/_server_test.py
  2. 2
      src/python/grpcio_tests/tests_aio/unit/server_test.py

@ -51,7 +51,7 @@ class ServerTest(unittest.TestCase):
def test_failed_port_binding_exception(self): def test_failed_port_binding_exception(self):
address, _, __ = get_socket() address, _, __ = get_socket()
server = grpc.server(None) server = grpc.server(None, options=(('grpc.so_reuseport', 0),))
with self.assertRaises(RuntimeError): with self.assertRaises(RuntimeError):
server.add_insecure_port(address) server.add_insecure_port(address)

@ -466,7 +466,7 @@ class TestServer(AioTestBase):
async def test_port_binding_exception(self): async def test_port_binding_exception(self):
address, _, __ = get_socket() address, _, __ = get_socket()
server = aio.server() server = aio.server(options=(('grpc.so_reuseport', 0),))
with self.assertRaises(RuntimeError): with self.assertRaises(RuntimeError):
server.add_insecure_port(address) server.add_insecure_port(address)

Loading…
Cancel
Save