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

close reaper go routines on DockerContainer.Terminate & DockerNetwork.Remove #320

Merged
merged 2 commits into from
May 21, 2021

Conversation

Eun
Copy link
Contributor

@Eun Eun commented May 10, 2021

This fixes the issue #319.

When Reaper is used, the DockerContainer.Terminate and DockerNetwork.Remove functions should close the spawned go routine by Reaper.Connect.

@mdelapenya
Copy link
Collaborator

Hi @Eun thanks for this PR, we'll review it ASAP. Would you mind adding the test you proposed in the original issue? Taht way we will be covered against regressions.

Thanks in advance

@Eun
Copy link
Contributor Author

Eun commented May 18, 2021

Hi @mdelapenya, adding a test would not be hegglpful since the other leak at #321 is still open, so adding a test as soon as both issues are fixed would make the most sense.
I guess just adding

func TestMain(m *testing.M) {
	goleak.VerifyTestMain(m)
}

would be enough.

@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #320 (906b5b4) into master (555d3e6) will increase coverage by 0.35%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
+ Coverage   63.18%   63.53%   +0.35%     
==========================================
  Files          13       13              
  Lines         910      916       +6     
==========================================
+ Hits          575      582       +7     
+ Misses        247      246       -1     
  Partials       88       88              
Impacted Files Coverage Δ
docker.go 65.68% <83.33%> (+0.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 555d3e6...906b5b4. Read the comment docs.

@gianarb gianarb merged commit b5754a6 into testcontainers:master May 21, 2021
@gianarb
Copy link
Collaborator

gianarb commented May 21, 2021

Thanks a lot for taking the time and open this PR! I will have a look at the open issue around docker connections. I think we really need to add the test you proposed.

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.

None yet

3 participants