all: prefer AddCleanup to TearDown #5023

Merged
merged 1 commit into from Apr 7, 2016

Conversation

Projects
None yet
2 participants
Contributor

davecheney commented Apr 7, 2016

A common failure mode of our tests is when an issue occurs during the
SetUp phase of the suite or test, not only does the test fail, but the
Tear down phase blows up because it is rarely written to handle the case
where the setup phase did not complete.

This PR is a toe in the water to experiment with applying a philosophy
of moving work from the TearDown phase of the test suite to a
'defer-like' AddCleanup style.

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

all: prefer AddCleanup to TearDown
A common failure mode of our tests is when an issue occurs during the
SetUp phase of the suite or test, not only does the test fail, but the
Tear down phase blows up because it is rarely written to handle the case
where the setup phase did not complete.

This PR is a toe in the water to experiment with applying a philosophy
of moving work from the TearDown phase of the test suite to a
'defer-like' AddCleanup style.
Contributor

davecheney commented Apr 7, 2016

$$merge$$

Contributor

jujubot commented Apr 7, 2016

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

@jujubot jujubot merged commit 4588d2e into juju:master Apr 7, 2016

@davecheney davecheney deleted the davecheney:cleanup-teardown-suite branch Apr 7, 2016

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