aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_tests/tests/health_check/_health_servicer_test.py')
-rw-r--r--src/python/grpcio_tests/tests/health_check/_health_servicer_test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
index 350b5eebe5..c1d9436c2f 100644
--- a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
+++ b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
@@ -39,8 +39,12 @@ class HealthServicerTest(unittest.TestCase):
health_pb2_grpc.add_HealthServicer_to_server(servicer, self._server)
self._server.start()
- channel = grpc.insecure_channel('localhost:%d' % port)
- self._stub = health_pb2_grpc.HealthStub(channel)
+ self._channel = grpc.insecure_channel('localhost:%d' % port)
+ self._stub = health_pb2_grpc.HealthStub(self._channel)
+
+ def tearDown(self):
+ self._server.stop(None)
+ self._channel.close()
def test_empty_service(self):
request = health_pb2.HealthCheckRequest()