Remove Python background poller thread

pull/14448/head
Ken Payson 7 years ago
parent 874f8128cd
commit a75712a71f
  1. 5
      src/python/grpcio/grpc/_channel.py
  2. 5
      src/python/grpcio_tests/tests/unit/_reconnect_test.py

@ -906,11 +906,6 @@ class Channel(grpc.Channel):
self._call_state = _ChannelCallState(self._channel)
self._connectivity_state = _ChannelConnectivityState(self._channel)
# TODO(https://github.com/grpc/grpc/issues/9884)
# Temporary work around UNAVAILABLE issues
# Remove this once c-core has retry support
_subscribe(self._connectivity_state, lambda *args: None, None)
def subscribe(self, callback, try_to_connect=None):
_subscribe(self._connectivity_state, callback, try_to_connect)

@ -89,7 +89,10 @@ class ReconnectTest(unittest.TestCase):
multi_callable = channel.unary_unary(_UNARY_UNARY)
self.assertEqual(_RESPONSE, multi_callable(_REQUEST))
server.stop(None)
time.sleep(1)
# By default, the channel connectivity is checked every 5s
# GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS can be set to change
# this.
time.sleep(5.1)
server = grpc.server(server_pool, (handler,))
server.add_insecure_port('[::]:{}'.format(port))
server.start()

Loading…
Cancel
Save