use of com.yahoo.container.logging.AccessLogInterface in project vespa by vespa-engine.
the class ProcessingHandlerTestCase method processing_handler_stores_trace_log_values_in_the_access_log_entry.
@Test
public void processing_handler_stores_trace_log_values_in_the_access_log_entry() throws InterruptedException {
ArgumentCaptor<AccessLogEntry> accessLogEntryCaptor = ArgumentCaptor.forClass(AccessLogEntry.class);
AccessLogInterface accessLog = Mockito.mock(AccessLogInterface.class);
driver = new ProcessingTestDriver(logValueChain, accessLog);
driver.sendRequest("http://localhost/?chain=log-value").readAll();
Mockito.verify(accessLog, times(1)).log(accessLogEntryCaptor.capture());
AccessLogEntry entry = accessLogEntryCaptor.getValue();
assertNotNull(entry);
assertThat(entry.getKeyValues().get(LOG_KEY), is(Collections.singletonList(LOG_VALUE)));
}
use of com.yahoo.container.logging.AccessLogInterface in project vespa by vespa-engine.
the class LoggingRequestHandlerTestCase method setUp.
@Before
public void setUp() throws Exception {
accessLogging = new StartTimePusher();
ComponentRegistry<AccessLogInterface> implementers = new ComponentRegistry<>();
implementers.register(new ComponentId("nalle"), accessLogging);
implementers.freeze();
executor = Executors.newCachedThreadPool();
handler = new AccessLogTestHandler(executor, new AccessLog(implementers));
}
Aggregations