HttpUnit doesn't properly shut down the connection, causing the queue on Jetty to run out. Switching to HtmlUnit, as the project seems more actively maintained.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11481 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-08-14 23:20:30 +00:00
1 parent e10778a055
commit 754f9934d4
3 files changed
+33 -14

No files matched your search

@@ -1,6 +1,6 @@
package org.jvnet.hudson.test;
import com.meterware.httpunit.WebResponse;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.model.FreeStyleProject;
import hudson.model.Hudson;
import hudson.model.Item;
@@ -115,12 +115,16 @@ public abstract class HudsonTestCase extends TestCase {
}
/**
* Extends {@link com.meterware.httpunit.WebConversation} and provide convenience methods
* Extends {@link com.gargoylesoftware.htmlunit.WebClient} and provide convenience methods
* for accessing Hudson.
*/
public class WebConversation extends com.meterware.httpunit.WebConversation {
public WebResponse getResponse(Item item) throws IOException, SAXException {
return getResponse("http://localhost:"+localPort+contextPath+item.getUrl());
public class WebClient extends com.gargoylesoftware.htmlunit.WebClient {
public WebClient() {
setJavaScriptEnabled(false);
}
public HtmlPage getPage(Item item) throws IOException, SAXException {
return (HtmlPage)getPage("http://localhost:"+localPort+contextPath+item.getUrl());
}
}
}