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

Test (*WorkerPool).Len after Close #23

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Mar 4, 2021

Test that the returned length is 0 after closing the worker pool.

@tklauser tklauser requested a review from rolinh March 4, 2021 15:53
workerpool_test.go Outdated Show resolved Hide resolved
Test that the returned length is 0 after closing the worker pool.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@tklauser tklauser force-pushed the pr/tklauser/test-len-after-close branch from a026830 to 5565b71 Compare March 4, 2021 16:03
@rolinh rolinh merged commit db8ad28 into master Mar 4, 2021
@rolinh rolinh deleted the pr/tklauser/test-len-after-close branch March 4, 2021 16:07
@@ -88,6 +88,13 @@ func TestWorkerPoolLen(t *testing.T) {
if l := wp.Len(); l != 1 {
t.Errorf("got %d; want %d", l, 1)
}

if err := wp.Close(); err != nil {
t.Errorf("close: got '%v', want no error", err)
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think this should be t.Fatalf instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, thanks. I've sent #24

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.

3 participants