Search in sources :

Example 1 with NoLogging

use of net.morimekta.providence.server.internal.NoLogging in project providence by morimekta.

the class ProvidenceServletTest method setUpServer.

@Before
public void setUpServer() throws Exception {
    Awaitility.setDefaultPollDelay(2, TimeUnit.MILLISECONDS);
    Log.setLog(new NoLogging());
    impl = mock(TestService.Iface.class);
    instrumentation = mock(ServiceCallInstrumentation.class);
    provider = new DefaultSerializerProvider();
    server = new Server(0);
    ServletContextHandler handler = new ServletContextHandler();
    handler.addServlet(new ServletHolder(new ProvidenceServlet(new TestService.Processor(impl), provider, instrumentation)), "/" + ENDPOINT);
    server.setHandler(handler);
    server.start();
    port = getExposedPort(server);
}
Also used : Server(org.eclipse.jetty.server.Server) NoLogging(net.morimekta.providence.server.internal.NoLogging) TestService(net.morimekta.test.providence.service.TestService) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) DefaultSerializerProvider(net.morimekta.providence.serializer.DefaultSerializerProvider) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) ServiceCallInstrumentation(net.morimekta.providence.util.ServiceCallInstrumentation) Before(org.junit.Before)

Example 2 with NoLogging

use of net.morimekta.providence.server.internal.NoLogging in project providence by morimekta.

the class ProvidenceServlet_ThriftClientTest method setUpServer.

@BeforeClass
public static void setUpServer() throws Exception {
    Awaitility.setDefaultPollDelay(2, TimeUnit.MILLISECONDS);
    Log.setLog(new NoLogging());
    impl = mock(TestService.Iface.class);
    instrumentation = mock(ServiceCallInstrumentation.class);
    provider = new DefaultSerializerProvider();
    server = new Server(0);
    ServletContextHandler handler = new ServletContextHandler();
    handler.addServlet(new ServletHolder(new ProvidenceServlet(new TestService.Processor(impl), provider, instrumentation)), "/" + ENDPOINT);
    server.setHandler(handler);
    server.start();
    port = getExposedPort(server);
}
Also used : Server(org.eclipse.jetty.server.Server) NoLogging(net.morimekta.providence.server.internal.NoLogging) TestService(net.morimekta.test.providence.service.TestService) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) DefaultSerializerProvider(net.morimekta.providence.serializer.DefaultSerializerProvider) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) ServiceCallInstrumentation(net.morimekta.providence.util.ServiceCallInstrumentation) BeforeClass(org.junit.BeforeClass)

Aggregations

DefaultSerializerProvider (net.morimekta.providence.serializer.DefaultSerializerProvider)2 NoLogging (net.morimekta.providence.server.internal.NoLogging)2 ServiceCallInstrumentation (net.morimekta.providence.util.ServiceCallInstrumentation)2 TestService (net.morimekta.test.providence.service.TestService)2 Server (org.eclipse.jetty.server.Server)2 ServletContextHandler (org.eclipse.jetty.servlet.ServletContextHandler)2 ServletHolder (org.eclipse.jetty.servlet.ServletHolder)2 Before (org.junit.Before)1 BeforeClass (org.junit.BeforeClass)1