Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
all: don't leak pingers in tests #5564
Conversation
|
|
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
LGTM |
|
Build failed: Tests failed |
added a commit
to davecheney/juju
that referenced
this pull request
Jun 9, 2016
davecheney
referenced this pull request
Jun 9, 2016
Merged
worker/catacomb: do not deincrement catacomb.wg until worker has stopped #5578
added a commit
to davecheney/juju
that referenced
this pull request
Jun 9, 2016
added a commit
to davecheney/juju
that referenced
this pull request
Jun 9, 2016
added a commit
that referenced
this pull request
Jun 9, 2016
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
howbazaar
reviewed
Jun 15, 2016
| if err != nil { | ||
| return err | ||
| } | ||
| // Wait for worker to finish or for us to be stopped. | ||
| - waitCh := make(chan error) | ||
| + done := make(chan error, 1) |
howbazaar
Jun 15, 2016
Owner
Why bother with the don channel at all? Why not just select on w.Wait() ?
davecheney
Jun 15, 2016
Contributor
I'd love too, but it's not a channel :(
On Wed, Jun 15, 2016 at 12:21 PM, Tim Penhey notifications@github.com
wrote:
In cmd/jujud/agent/machine.go
#5564 (comment):if err != nil { return err } // Wait for worker to finish or for us to be stopped.
waitCh := make(chan error)done := make(chan error, 1)Why bother with the don channel at all? Why not just select on w.Wait() ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/juju/juju/pull/5564/files/6440a4de17a3c6ff99a44fab67be7d3b20114cfe#r67090236,
or mute the thread
https://github.com/notifications/unsubscribe/AAAcA3DDCWJnpjOhaXB9IEDz5XRmhKJXks5qL2GogaJpZM4IwhyC
.
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
davecheney commentedJun 8, 2016
•
Edited 1 time
-
davecheney
Jun 8, 2016
Fixes LP 1590161
The fixtures for the many tests were starting pingers and loosing
track of them; assuming that they would die eventually when mongodb
shuts down ... which is true, except their death was not as private
an affair as previously assumed.
Fix the pinger leak by adding a cleanup action. This lets us remove the
recover in pinger.ping which previously would silently discard this
panic.
Editorial: the root cause of this problem is the mgo driver's copying
semantics -- rather than obtaining a connection to the database, you
copy a collection which is assumed to be already connected. Because this
copy operation does not return an error, the driver has forced itself
into using a panic.
Additionally the SetAgentPresence API on various 'present' things comes
with a footgun of not making clear just how important it is to keep
track of the thing that is tracking presence. The name of that API,
SetAgentPresencelulls the reader into thinking it's some kind ofboolean setter "yes, I'd like to track the presence of this thing."
There is little clue that calling that method returns a resource that
if not handled carefully will cause your program to panic randomly.