apiserver: TestAgentConnectionsShutDownWhenStateDies is very slow

Bug #1497229 reported by Andrew Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Andrew Wilkins

Bug Description

This test takes 60s to run (on my machine; should be more or less the same on any machine). I've investigated the issue, and found that it's due to the presence pinger on connection termination.

What happens is this:
 1. test kills mongo
 2. apiserver's mongo pinger finds mongo is dead, initiates connection termination
 3. connection termination code runs resource cleanups
 4. machine pinger resource's cleanup calls the presence pinger's Stop(), and then Kill() methods

The presence.Pinger.Kill() method is hanging around for 30s (x2 -- one in the test, one in the tear down) because it's waiting for a connection (the timeout is 30s).

Tags: unit-tests
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Probably what we should do is, when the mongo connection is known to be dead, not attempt to Kill() the presence.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Hooray, shaved 60s off the apiserver package tests. Only 120s to go.

Changed in juju-core:
status: In Progress → Fix Committed
Changed in juju-core:
milestone: 1.26.0 → 2.0-alpha1
Changed in juju-core:
milestone: 2.0-alpha1 → 1.26-alpha3
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.