some tests take an unnecessarily long time waiting for the poll interval
Bug #1163983 reported by
Roger Peppe
on 2013-04-03
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju |
Low
|
Unassigned | ||
| | juju-core |
Low
|
Unassigned | ||
Bug Description
The default state/watcher poll interval is 5 seconds. If we have a handle on the state, we
can use StartRefresh to make it poll immediately, but various tests do not,
and are thus doomed to sleep for 5 seconds before seeing the changes they're
interested in.
Prime candidate for a solution is to allow tests to set a much shorter poll interval.
Another possibility is to add a global StartRefresh that triggers a poll in all
extant watchers.
| William Reade (fwereade) wrote : | #1 |
| Changed in juju-core: | |
| importance: | Undecided → Low |
| status: | New → Triaged |
| tags: | added: tech-debt |
Curtis Hovey (sinzui)
on 2013-10-15
| tags: | added: performance testing |
Anastasia (anastasia-macmood)
on 2016-10-17
| Changed in juju-core: | |
| status: | Triaged → Won't Fix |
| Roger Peppe (rogpeppe) wrote : | #2 |
I think it's still worth keeping this bug open. Long test runs are an active pain and this is one significant reason for tests taking a long time. It should not be too hard to fix.
Anastasia (anastasia-macmood)
on 2016-10-17
| Changed in juju: | |
| status: | New → Triaged |
| importance: | Undecided → Low |
| milestone: | none → 2.0.1 |
Curtis Hovey (sinzui)
on 2016-11-01
| Changed in juju: | |
| milestone: | 2.0.1 → none |
To post a comment you must log in.


With lp:1144355's solution in place, tests can be run with watcher.Period of 50ms. Doesn't actually help much, and 5ms seems to make it worse again. There might well be something to glean that I'm not seeing, though, so I'm leaving it open if someone else wants to take a look.