aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2015-08-30 20:09:33 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2015-08-30 20:09:33 +0000
commitdff73c7d23fe6fa405b7311696e8f3c4b8484e8e (patch)
tree84ea564a1acd7e2773332b0a3f7ff262719d9011
parent68e63c7fc7f9cef30053e56de149b43685451199 (diff)
Drop invoker during test tear-down
The invoker is an object derived from, and referring to, objects of the Face implementation under test. If those objects are to be garbage collected at the appropriate time the invoker that references them must be made eligible for garbage collection in the test's tearDown method.
-rw-r--r--src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py1
-rw-r--r--src/python/grpcio_test/grpc_test/framework/interfaces/face/_event_invocation_synchronous_event_service.py1
-rw-r--r--src/python/grpcio_test/grpc_test/framework/interfaces/face/_future_invocation_asynchronous_event_service.py1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
index 8804f3f223..b7dd5d4d17 100644
--- a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
+++ b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
@@ -73,6 +73,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase):
Overriding implementations must call this implementation.
"""
+ self._invoker = None
self.implementation.destantiate(self._memo)
def testSuccessfulUnaryRequestUnaryResponse(self):
diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_event_invocation_synchronous_event_service.py b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_event_invocation_synchronous_event_service.py
index 5a78b4bed2..7cb273bf78 100644
--- a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_event_invocation_synchronous_event_service.py
+++ b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_event_invocation_synchronous_event_service.py
@@ -74,6 +74,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase):
Overriding implementations must call this implementation.
"""
+ self._invoker = None
self.implementation.destantiate(self._memo)
def testSuccessfulUnaryRequestUnaryResponse(self):
diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
index d1107e1576..272a37f15f 100644
--- a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
+++ b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
@@ -103,6 +103,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase):
Overriding implementations must call this implementation.
"""
+ self._invoker = None
self.implementation.destantiate(self._memo)
self._digest_pool.shutdown(wait=True)