Skip to content

Commit dfc7aa5

Browse files
authored
Fix grpc tests when running from cmd-line/eachdist script (#1027)
* when running the grpc tests with pytest or eachdist from the command line the 2nd test trying to connect to the test server failed with a connection refused message. Seems like the connection from the previous test was still alive due to the channel not being properly closed.
1 parent 281a0e6 commit dfc7aa5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-grpc/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ packages=find_namespace:
4242
install_requires =
4343
opentelemetry-api == 0.13dev0
4444
opentelemetry-sdk == 0.13dev0
45-
grpcio == 1.30
45+
grpcio ~= 1.27
4646

4747
[options.extras_require]
4848
test =

Diff for: instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def tearDown(self):
4949
GrpcInstrumentorClient().uninstrument()
5050
self.memory_metrics_exporter.clear()
5151
self.server.stop(None)
52+
self.channel.close()
5253

5354
def _verify_success_records(self, num_bytes_out, num_bytes_in, method):
5455
# pylint: disable=protected-access,no-member

0 commit comments

Comments
 (0)