graceful test shutdown
This commit is contained in:
parent
48131f1fab
commit
ae0c8ce2af
|
@ -42,6 +42,7 @@ import org.eclipse.jetty.server.Response;
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.ServerConnector;
|
import org.eclipse.jetty.server.ServerConnector;
|
||||||
import org.eclipse.jetty.server.handler.RequestLogHandler;
|
import org.eclipse.jetty.server.handler.RequestLogHandler;
|
||||||
|
import org.eclipse.jetty.server.handler.StatisticsHandler;
|
||||||
import org.eclipse.jetty.servlet.FilterHolder;
|
import org.eclipse.jetty.servlet.FilterHolder;
|
||||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||||
import org.eclipse.jetty.servlet.ServletHandler;
|
import org.eclipse.jetty.servlet.ServletHandler;
|
||||||
|
@ -331,7 +332,7 @@ public class ContinuationsTest
|
||||||
private String process(String query, String content) throws Exception
|
private String process(String query, String content) throws Exception
|
||||||
{
|
{
|
||||||
Server server = new Server();
|
Server server = new Server();
|
||||||
|
server.setStopTimeout(20000);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ServerConnector connector = new ServerConnector(server);
|
ServerConnector connector = new ServerConnector(server);
|
||||||
|
@ -341,7 +342,9 @@ public class ContinuationsTest
|
||||||
log.clear();
|
log.clear();
|
||||||
}
|
}
|
||||||
history.clear();
|
history.clear();
|
||||||
server.setHandler(this.setupHandler);
|
StatisticsHandler stats = new StatisticsHandler();
|
||||||
|
server.setHandler(stats);
|
||||||
|
stats.setHandler(this.setupHandler);
|
||||||
|
|
||||||
server.start();
|
server.start();
|
||||||
int port=connector.getLocalPort();
|
int port=connector.getLocalPort();
|
||||||
|
|
Loading…
Reference in New Issue