Skip to content

Commit 448b4f9

Browse files
committed
cleanup
1 parent 96efc56 commit 448b4f9

3 files changed

Lines changed: 6 additions & 38 deletions

File tree

src/test/java/org/htmlunit/HttpWebConnectionProxyTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public void setup() throws Exception {
4343
WebDriverTestCase.stopWebServers();
4444
startWebServer("src/test/resources/testfiles/noproxyroot/");
4545

46-
proxyWebServer_ = createWebServer(PORT_PROXY_SERVER, "src/test/resources/testfiles/proxyroot/", null);
46+
proxyWebServer_ = JettyServerUtils.startWebServer(PORT_PROXY_SERVER,
47+
"src/test/resources/testfiles/proxyroot/", null,
48+
null, false, SSLVariant.NONE);
4749

4850
final WebClient webClient = getWebClient();
4951

src/test/java/org/htmlunit/WebDriverTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ protected static void startWebServer(final String resourceBase, final Map<String
695695
LAST_TEST_UsesMockWebConnection_ = Boolean.FALSE;
696696

697697
STATIC_SERVER_STARTER_ = ExceptionUtils.getStackTrace(new Throwable("StaticServerStarter"));
698-
STATIC_SERVER_ = WebServerTestCase.createWebServer(PORT, resourceBase, servlets);
698+
STATIC_SERVER_ = JettyServerUtils.startWebServer(PORT, resourceBase, servlets, null, false, SSLVariant.NONE);
699699
}
700700

701701
/**
@@ -712,7 +712,7 @@ protected static void startWebServer2(final String resourceBase, final Map<Strin
712712
JettyServerUtils.stopServer(STATIC_SERVER2_);
713713
}
714714
STATIC_SERVER2_STARTER_ = ExceptionUtils.getStackTrace(new Throwable("StaticServer2Starter"));
715-
STATIC_SERVER2_ = WebServerTestCase.createWebServer(PORT2, resourceBase, servlets);
715+
STATIC_SERVER2_ = JettyServerUtils.startWebServer(PORT2, resourceBase, servlets, null, false, SSLVariant.NONE);
716716
}
717717

718718
/**

src/test/java/org/htmlunit/WebServerTestCase.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,6 @@ protected void startWebServer(final String resourceBase) throws Exception {
7474
server_ = JettyServerUtils.startWebServer(PORT, resourceBase, null, null, isBasicAuthentication(), getSSLVariant());
7575
}
7676

77-
/**
78-
* This is usually needed if you want to have a running server during many tests invocation.
79-
* <p>
80-
* Creates and starts a web server on the default {@link #PORT}.
81-
* The given resourceBase is used to be the ROOT directory that serves the default context.
82-
* <p><b>Don't forget to stop the returned Server after the test</b>
83-
*
84-
* @param resourceBase the base of resources for the default context
85-
* @return the newly created server
86-
* @throws Exception if an error occurs
87-
*/
88-
public static Server createWebServer(final String resourceBase) throws Exception {
89-
return createWebServer(PORT, resourceBase, null);
90-
}
91-
92-
/**
93-
* This is usually needed if you want to have a running server during many tests invocation.
94-
* <p>
95-
* Creates and starts a web server on the default {@link #PORT}.
96-
* The given resourceBase is used to be the ROOT directory that serves the default context.
97-
* <p><b>Don't forget to stop the returned Server after the test</b>
98-
*
99-
* @param port the port to which the server is bound
100-
* @param resourceBase the base of resources for the default context
101-
* @param servlets map of {String, Class} pairs: String is the path spec, while class is the class
102-
* @return the newly created server
103-
* @throws Exception if an error occurs
104-
*/
105-
public static Server createWebServer(final int port, final String resourceBase,
106-
final Map<String, Class<? extends Servlet>> servlets) throws Exception {
107-
108-
return JettyServerUtils.startWebServer(port, resourceBase, servlets, null, false, SSLVariant.NONE);
109-
}
110-
11177
/**
11278
* Starts the web server on the default {@link #PORT}.
11379
* The given resourceBase is used to be the ROOT directory that serves the default context.
@@ -123,7 +89,7 @@ protected void startWebServer(final String resourceBase,
12389
throw new IllegalStateException("startWebServer() can not be called twice");
12490
}
12591

126-
server_ = createWebServer(PORT, resourceBase, servlets);
92+
server_ = JettyServerUtils.startWebServer(PORT, resourceBase, servlets, null, false, SSLVariant.NONE);
12793
}
12894

12995
/**

0 commit comments

Comments
 (0)