diff options
author | Vijay Pai <vpai@google.com> | 2016-08-25 14:49:18 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2016-08-25 14:49:18 -0700 |
commit | ac4113bef128abd57cc166a4921063b0b4c5278d (patch) | |
tree | f5b0b4a72310252d86c502659283c6ad76a47539 /src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py | |
parent | 326d939873eb96c68d3ebb859c12b4bf022dadc6 (diff) | |
parent | c931305c398e7e87013da52a5c2697d0fb14ad7f (diff) |
Merge branch 'master' into fc_unary
Diffstat (limited to 'src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py')
-rw-r--r-- | src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py index e8982ed2de..24f5b45b18 100644 --- a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py +++ b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py @@ -31,12 +31,12 @@ import threading import unittest -from concurrent import futures import grpc from grpc import _channel from grpc import _server from tests.unit.framework.common import test_constants +from tests.unit import _thread_pool class _Callback(object): @@ -78,7 +78,8 @@ class ChannelReadyFutureTest(unittest.TestCase): self.assertFalse(ready_future.running()) def test_immediately_connectable_channel_connectivity(self): - server = _server.Server(futures.ThreadPoolExecutor(max_workers=0), ()) + thread_pool = _thread_pool.RecordingThreadPool(max_workers=None) + server = _server.Server(thread_pool, ()) port = server.add_insecure_port('[::]:0') server.start() channel = grpc.insecure_channel('localhost:{}'.format(port)) @@ -97,6 +98,7 @@ class ChannelReadyFutureTest(unittest.TestCase): self.assertFalse(ready_future.cancelled()) self.assertTrue(ready_future.done()) self.assertFalse(ready_future.running()) + self.assertFalse(thread_pool.was_used()) if __name__ == '__main__': |