- more groovy support

- reset UpdateCenter every time for better isolation.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20834 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-08-18 17:03:47 +00:00
1 parent 2d8713a57c
commit d1ab9c5bf5
1 file changed
+9 -2
@@ -233,7 +233,9 @@ public abstract class HudsonTestCase extends TestCase {
return updateCenterUrl;
}
});
// don't waste bandwidth talking to the update center
DownloadService.neverUpdate = true;
UpdateCenter.neverUpdate = true;
// cause all the descriptors to reload.
// ideally we'd like to reset them to properly emulate the behavior, but that's not possible.
@@ -839,6 +841,13 @@ public abstract class HudsonTestCase extends TestCase {
throw new AssertionError("HudsonTestCase "+getName()+" is not supposed to be serialized");
}
/**
* This is to assist Groovy test clients who are incapable of instantiating the inner classes properly.
*/
public WebClient createWebClient() {
return new WebClient();
}
/**
* Extends {@link com.gargoylesoftware.htmlunit.WebClient} and provide convenience methods
* for accessing Hudson.
@@ -1004,8 +1013,6 @@ public abstract class HudsonTestCase extends TestCase {
static {
// screen scraping relies on locale being fixed.
Locale.setDefault(Locale.ENGLISH);
// don't waste bandwidth talking to the update center
UpdateCenter.neverUpdate = true;
{// enable debug assistance, since tests are often run from IDE
Dispatcher.TRACE = true;