diff options
author | Lidi Zheng <lidiz@google.com> | 2018-11-29 12:57:00 -0800 |
---|---|---|
committer | Lidi Zheng <lidiz@google.com> | 2018-11-29 12:57:00 -0800 |
commit | 69b6c047bc767b4d80e7af4d00ccb7c45b683dae (patch) | |
tree | be20a9dbd7467126fe71c7077b7339a874a0c37d /src/python/grpcio_tests/tests/channelz | |
parent | 8e3234963eeba191f6c011cd0082868ab92c5815 (diff) |
Update docstring of Channelz function && add default variable initialization
Diffstat (limited to 'src/python/grpcio_tests/tests/channelz')
-rw-r--r-- | src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py b/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py index f099a2c8cb..84f8594689 100644 --- a/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py +++ b/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py @@ -130,6 +130,7 @@ class ChannelzServicerTest(unittest.TestCase): return resp.channel[idx].ref.channel_id def setUp(self): + self._pairs = [] # This server is for Channelz info fetching only # It self should not enable Channelz self._server = grpc.server( @@ -148,10 +149,7 @@ class ChannelzServicerTest(unittest.TestCase): def tearDown(self): self._server.__del__() self._channel.close() - # _pairs may not exist, if the test crashed during setup - # In 'invalid query' tests, _pairs may never get set - if hasattr(self, '_pairs'): - _clean_channel_server_pairs(self._pairs) + _clean_channel_server_pairs(self._pairs) def test_get_top_channels_basic(self): self._pairs = _generate_channel_server_pairs(1) |