use of com.yahoo.jdisc.http.server.jetty.TestDriver in project vespa by vespa-engine.
the class ServletAccessLoggingTest method accessLogIsInvokedForNonJDiscServlet.
@Test
public void accessLogIsInvokedForNonJDiscServlet() throws Exception {
final AccessLog accessLog = mock(AccessLog.class);
final TestDriver testDriver = newTestDriver(accessLog);
httpGet(testDriver, TestServlet.PATH).execute();
verifyCallsLog(accessLog, timeout(MAX_LOG_WAIT_TIME_MILLIS).times(1));
}
use of com.yahoo.jdisc.http.server.jetty.TestDriver in project vespa by vespa-engine.
the class JDiscFilterForServletTest method request_can_be_forwarded_through_request_filter_to_servlet.
@Test
public void request_can_be_forwarded_through_request_filter_to_servlet() throws IOException {
TestDriver testDriver = requestFilterTestDriver();
ResponseValidator response = httpGet(testDriver, TestServlet.PATH).addHeader(TestRequestFilter.BYPASS_FILTER_HEADER, Boolean.TRUE.toString()).execute();
response.expectContent(containsString(TestServlet.RESPONSE_CONTENT));
}
Aggregations