fixed proxy tests
This commit is contained in:
parent
3fb3616b21
commit
2ef92d5477
|
@ -258,6 +258,8 @@ public class ProxyServlet extends HttpServlet
|
|||
if (value == null || "-".equals(value))
|
||||
{
|
||||
executor = (Executor)getServletContext().getAttribute("org.eclipse.jetty.server.Executor");
|
||||
if (executor==null)
|
||||
throw new IllegalStateException("No server executor for proxy");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -239,7 +239,7 @@ public class ProxyServletTest
|
|||
result.setProxyConfiguration(new ProxyConfiguration("localhost", proxyConnector.getLocalPort()));
|
||||
QueuedThreadPool threadPool = new QueuedThreadPool();
|
||||
threadPool.setName("foo");
|
||||
threadPool.setMaxThreads(2);
|
||||
threadPool.setMaxThreads(20);
|
||||
result.setExecutor(threadPool);
|
||||
result.start();
|
||||
|
||||
|
@ -269,7 +269,6 @@ public class ProxyServletTest
|
|||
|
||||
for ( int i = 0; i < 10; ++i )
|
||||
{
|
||||
|
||||
Assert.assertEquals(200, responses[i].getStatus());
|
||||
Assert.assertTrue(responses[i].getHeaders().containsKey(PROXIED_HEADER));
|
||||
Assert.assertArrayEquals(content, responses[i].getContent());
|
||||
|
|
Loading…
Reference in New Issue