diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2012-06-03 08:00:48 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2012-06-03 08:00:48 +0200 |
commit | ac98c29df9e425fb8b951d47fe0a24bf11a2bbd3 (patch) | |
tree | c68957fe1cd245b645fe355ef062a8730a266b91 /org.eclipse.jgit.junit.http | |
parent | 23b8136f8c6529ee13b48e08fef26d3c1feccd33 (diff) | |
download | jgit-ac98c29df9e425fb8b951d47fe0a24bf11a2bbd3.tar.gz jgit-ac98c29df9e425fb8b951d47fe0a24bf11a2bbd3.zip |
Use default thread pool to prevent thread pool starvation
Bug: 380302
Change-Id: Ie66d495481776469ff2aa603c550557cff82cafc
Suggested-By: Joakim Erdfelt <joakim@intalio.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.junit.http')
-rw-r--r-- | org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index 04ccc14add..6b0e0603e9 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, Google Inc. + * Copyright (C) 2010, 2012 Google Inc. * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -67,7 +67,6 @@ import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.security.Constraint; import org.eclipse.jetty.util.security.Password; -import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jgit.transport.URIish; /** @@ -112,17 +111,6 @@ public class AppServer { throw new RuntimeException("Cannot find localhost", e); } - // We need a handful of threads in the thread pool, otherwise - // our tests will deadlock when they can't open enough requests. - // In theory we only need 1 concurrent connection at a time, but - // I suspect the JRE isn't doing request pipelining on existing - // connections like we want it to. - // - final QueuedThreadPool pool = new QueuedThreadPool(); - pool.setMinThreads(1); - pool.setMaxThreads(4); - pool.setMaxQueued(8); - contexts = new ContextHandlerCollection(); log = new TestRequestLog(); @@ -130,11 +118,7 @@ public class AppServer { server = new Server(); server.setConnectors(new Connector[] { connector }); - server.setThreadPool(pool); server.setHandler(log); - - server.setStopAtShutdown(false); - server.setGracefulShutdown(0); } /** |