There's no guarantee that the tearDown method completes, so make sure we have clean environment by doing this in the setUp.
This commit is contained in:
Kohsuke Kawaguchi committed 2012-05-30 14:23:12 -07:00
1 parent 642a57c7ab
commit 0ffe9d591f
1 file changed
+3
@@ -296,6 +296,9 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
AbstractProject.WORKSPACE.toString();
User.clear();
// just in case tearDown failed in the middle, make sure to really clean them up so that there's no left-over from earlier tests
ExtensionList.clearLegacyInstances();
DescriptorExtensionList.clearLegacyInstances();
try {
jenkins = hudson = newHudson();