Merge pull request #1233 from himanshug/async_query_forwarding_servlet_test_fix

checking potential fix for build failures on AsyncQueryForwardingServletTest
This commit is contained in:
Xavier Léauté 2015-03-23 10:29:37 -07:00
commit b2f3521cc2
1 changed files with 24 additions and 23 deletions

View File

@ -154,8 +154,7 @@ public class AsyncQueryForwardingServletTest extends BaseJettyTest
}
};
root.addServlet(
new ServletHolder(
ServletHolder holder = new ServletHolder(
new AsyncQueryForwardingServlet(
injector.getInstance(ObjectMapper.class),
injector.getInstance(Key.get(ObjectMapper.class, Smile.class)),
@ -171,16 +170,18 @@ public class AsyncQueryForwardingServletTest extends BaseJettyTest
// noop
}
}
) {
)
{
@Override
protected URI rewriteURI(HttpServletRequest request)
{
URI uri = super.rewriteURI(request);
return URI.create(uri.toString().replace("/proxy", ""));
}
}
), "/proxy/*"
);
});
//NOTE: explicit maxThreads to workaround https://tickets.puppetlabs.com/browse/TK-152
holder.setInitParameter("maxThreads", "256");
root.addServlet(holder, "/proxy/*");
JettyServerInitUtils.addExtensionFilters(root, injector);
root.addFilter(JettyServerInitUtils.defaultAsyncGzipFilterHolder(), "/*", null);
root.addFilter(GuiceFilter.class, "/slow/*", null);