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

fix multiple issues in the mock tests #850

Merged
merged 6 commits into from
Mar 23, 2020
Merged

fix multiple issues in the mock tests #850

merged 6 commits into from
Mar 23, 2020

Conversation

Stebalien
Copy link
Member

They were OOMing on my machine and I ended up digging through multiple bugs.

_, err := FullMeshConnected(context.Background(), 2)
ctx, cancel := context.WithCancel(context.Background())
_, err := FullMeshConnected(ctx, 2)
cancel()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the need for this seems to indicate there are still tasks attached to the context by this process that aren't cleaned up as we might hope. canceling the context solves this problem and is good to be able to do, but we should probably mark the underlying laziness for cleanup as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FullMessConnected returns a fully connected network. Unfortunately, the "correct" way to close that network is to cancel the context. There's no explicit close function.

@Stebalien Stebalien merged commit 1425d55 into master Mar 23, 2020
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