use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class ResponseHeaderItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
serverResponse = Mockito.mock(HttpServerResponse.class);
response = Mockito.mock(Response.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class TraceIdItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
accessLogEvent = new ServerAccessLogEvent();
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
invocation = Mockito.mock(Invocation.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
clientContext.clear();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class RemoteHostItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = mock(RoutingContext.class);
finishEvent = mock(InvocationFinishEvent.class);
invocation = mock(Invocation.class);
serverRequest = mock(HttpServerRequest.class);
endpoint = mock(Endpoint.class);
uriEndpointObject = mock(URIEndpointObject.class);
socketAddress = mock(SocketAddress.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class ResponseSizeItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
serverResponse = Mockito.mock(HttpServerResponse.class);
accessLogEvent = new ServerAccessLogEvent();
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
use of org.apache.servicecomb.core.event.ServerAccessLogEvent in project java-chassis by ServiceComb.
the class LocalHostItemTest method initStrBuilder.
@Before
public void initStrBuilder() {
accessLogEvent = new ServerAccessLogEvent();
routingContext = Mockito.mock(RoutingContext.class);
finishEvent = Mockito.mock(InvocationFinishEvent.class);
serverRequest = Mockito.mock(HttpServerRequest.class);
socketAddress = Mockito.mock(SocketAddress.class);
invocation = Mockito.mock(Invocation.class);
restClientRequest = Mockito.mock(RestClientRequestImpl.class);
clientRequest = Mockito.mock(HttpClientRequest.class);
connection = Mockito.mock(HttpConnection.class);
Map<String, Object> handlerMap = new HashMap<>();
handlerMap.put(RestConst.INVOCATION_HANDLER_REQUESTCLIENT, restClientRequest);
when(finishEvent.getInvocation()).thenReturn(invocation);
when(invocation.getHandlerContext()).thenReturn(handlerMap);
accessLogEvent.setRoutingContext(routingContext);
strBuilder = new StringBuilder();
}
Aggregations