Update clock.Clock handling to prevent timeouts. #6366

Merged
merged 1 commit into from Sep 30, 2016

Conversation

Projects
None yet
3 participants
Contributor

reedobrien commented Sep 30, 2016

clock.Clock.Advance intermittently advances the time before clock.After
adds an alarm to be notified. This uses a new WaitAdvance method that
only advances time after something is in clock.waiting. It also uses
the zerotime appropriately rather than time now.

More information about this can be found on the wiki: cf.
https://github.com/juju/juju/wiki/Intermittent-failures
There was also discussion on IRC about the use of alarms; cf.
https://irclogs.ubuntu.com/2016/09/30/%23juju-dev.txt

Fixes: https://bugs.launchpad.net/juju/+bug/1607044

QA:

  1. Run unit tests, all pass
  2. Run the TestUpdatesAfterPeriod under stress an ensure the test no longer fails intermittently. (before fix it failed easily in <15 runs after not after 5000).
Update clock.Clock handling to prevent timeouts.
clock.Clock.Advance intermittently advances the time before clock.After
adds an alarm to be notified. This uses a new WaitAdvance method that
only advances time after something is in clock.waiting. It also uses
the zerotime appropriately rather than time now.

More information about this can be found on the wiki: cf.
https://github.com/juju/juju/wiki/Intermittent-failures
There was also discussion on IRC about the use of alarms; cf.
https://irclogs.ubuntu.com/2016/09/30/%23juju-dev.txt

Fixes: https://bugs.launchpad.net/juju/+bug/1607044

Looks good!

Contributor

reedobrien commented Sep 30, 2016

$$merge$$

Contributor

jujubot commented Sep 30, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 9422438 into juju:master Sep 30, 2016

@reedobrien reedobrien deleted the reedobrien:lp/1607044_intermittent-timeout branch Sep 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment