diff --git a/api_core/google/api_core/grpc_helpers.py b/api_core/google/api_core/grpc_helpers.py index 329971e69336..6a2f052f8403 100644 --- a/api_core/google/api_core/grpc_helpers.py +++ b/api_core/google/api_core/grpc_helpers.py @@ -358,3 +358,7 @@ def subscribe(self, callback, try_to_connect=False): def unsubscribe(self, callback): """grpc.Channel.unsubscribe implementation.""" pass + + def close(self): + """grpc.Channel.close implementation.""" + pass diff --git a/api_core/tests/unit/test_grpc_helpers.py b/api_core/tests/unit/test_grpc_helpers.py index a5bcced16614..e5e4311ee732 100644 --- a/api_core/tests/unit/test_grpc_helpers.py +++ b/api_core/tests/unit/test_grpc_helpers.py @@ -375,3 +375,7 @@ def test_subscribe_unsubscribe(self): channel = grpc_helpers.ChannelStub() assert channel.subscribe(None) is None assert channel.unsubscribe(None) is None + + def test_close(self): + channel = grpc_helpers.ChannelStub() + assert channel.close() is None