cmd/jujud/agent: Ensure workers are stable in tests #5908

Merged
merged 1 commit into from Aug 2, 2016

Conversation

Projects
None yet
2 participants
Contributor

mjs commented Aug 1, 2016

EngineMatchFunc has been replaced with NewWorkerMatcher. NewWorkerMatcher uses the same approach as EngineMatchFunc but will only report a match if the required workers have been running for at least 1s. This means that TestHostedModelWorkers - which is known to have problems - now fails reliably (it is still being skipped - fix coming).

All tests which used EngineMatchFunc now use NewWorkerMatcher.

TestMigratingModelWorkers was been reenabled. It doesn't suffer from the same issue as TestHostedModelWorkers, is actually passing reliably and shouldn't have been skipped.

The WaitMatch helper is now used in all places where it can be - reducing a significant amount of test boilerplate.

(Review request: http://reviews.vapour.ws/r/5346/)

cmd/jujud/agent: Ensure workers are stable in tests
EngineMatchFunc has been replaced with NewWorkerMatcher.
NewWorkerMatcher uses the same approach as EngineMatchFunc but will
only report a match if the required workers have been running for at
least 1s. This means that TestHostedModelWorkers - which is known to
have problems - now fails reliably (it is still being skipped - fix
coming).

All tests which used EngineMatchFunc now use NewWorkerMatcher.

TestMigratingModelWorkers was been reenabled. It doesn't suffer from
the same issue as TestHostedModelWorkers, is actually passing
reliably and shouldn't have been skipped.

The WaitMatch helper is now used in all places where it can be -
reducing a significant amount of test boilerplate.
Contributor

mjs commented Aug 1, 2016

$$merge$$

Contributor

jujubot commented Aug 1, 2016

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

Contributor

jujubot commented Aug 1, 2016

Build failed: Does not match ['fixes-1603221']
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/8589

Contributor

mjs commented Aug 2, 2016

$$JFDI$$

Contributor

jujubot commented Aug 2, 2016

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

@jujubot jujubot merged commit cebf677 into juju:master Aug 2, 2016

@mjs mjs deleted the mjs:1600301-reliable-fail branch Aug 2, 2016

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