Skip to content

Commit

Permalink
Fix grpc tests when running from cmd-line/eachdist script (#1027)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
mariojonke authored Aug 21, 2020
1 parent 281a0e6 commit dfc7aa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ packages=find_namespace:
install_requires =
opentelemetry-api == 0.13dev0
opentelemetry-sdk == 0.13dev0
grpcio == 1.30
grpcio ~= 1.27

[options.extras_require]
test =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def tearDown(self):
GrpcInstrumentorClient().uninstrument()
self.memory_metrics_exporter.clear()
self.server.stop(None)
self.channel.close()

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

0 comments on commit dfc7aa5

Please sign in to comment.