Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown ManagedChannel resources in tests #5114

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

jack-berg
Copy link
Member

The build output is full of ugly stack traces that start look like the following:

    [Test worker] ERROR io.grpc.internal.ManagedChannelOrphanWrapper - *~*~*~ Previous channel ManagedChannelImpl{logId=95, target=127.0.0.1:49651} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
    	at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:100)

I've been ignoring this for a while thinking that it wasn't easily solved, but took a closer look today and noticed that the stack trace actually points to the site where a ManagedChannel was initialized and never shutdown. Went through offending tests and closed the resources and the build output is a lot cleaner.

@jack-berg jack-berg requested a review from a team January 11, 2023 17:34
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 91.06% // Head: 91.06% // No change to project coverage 👍

Coverage data is based on head (0011f6f) compared to base (f3b1f4a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5114   +/-   ##
=========================================
  Coverage     91.06%   91.06%           
  Complexity     4888     4888           
=========================================
  Files           551      551           
  Lines         14464    14464           
  Branches       1390     1390           
=========================================
  Hits          13172    13172           
  Misses          893      893           
  Partials        399      399           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jkwatson jkwatson merged commit 727850e into open-telemetry:main Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants