Skip to content

Remove t.Log from mock task controller#2919

Merged
dperny merged 1 commit intomoby:masterfrom
dperny:remove-test-log
Dec 30, 2019
Merged

Remove t.Log from mock task controller#2919
dperny merged 1 commit intomoby:masterfrom
dperny:remove-test-log

Conversation

@dperny
Copy link
Collaborator

@dperny dperny commented Dec 18, 2019

Previous, worker_test.go included a call to t.Log in the mock task controller. This presented a problem: because goroutines spawned by a test are not exited when the test completes, any holdover goroutines, like the one spawned to close the task controller, live on. This creates a problem when that goroutine calls t.Log on a test that has already completed.

This t.Log call doesn't add enough information to bother worrying about. Further, these goroutines, though they may outlive the test, don't actually affect anything or matter, so there's no rush to fix the test to ensure all goroutines exit.

This ought to fix a frequently observed test flake.

Previous, worker_test.go included a call to t.Log in the mock task
controller. This presented a problem: because goroutines spawned by a
test are not exited when the test completes, any holdover goroutines,
like the one spawned to close the task controller, live on. This creates
a problem when that goroutine calls t.Log on a test that has already
completed.

This t.Log call doesn't add enough information to bother worrying about.
Further, these goroutines, though they may outlive the test, don't
actually affect anything or matter, so there's no rush to fix the test
to ensure all goroutines exit.

Signed-off-by: Drew Erny <[email protected]>
@codecov
Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #2919 into master will increase coverage by 0.26%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2919      +/-   ##
==========================================
+ Coverage   61.62%   61.88%   +0.26%     
==========================================
  Files         139      139              
  Lines       22615    22615              
==========================================
+ Hits        13936    13995      +59     
+ Misses       7194     7134      -60     
- Partials     1485     1486       +1

@dperny dperny merged commit 123bb74 into moby:master Dec 30, 2019
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.

1 participant