提交 d1ab9c5b 编写于 作者: K kohsuke

- 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
上级 2d8713a5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册