Search in sources :

Example 1 with Processor

use of net.morimekta.test.providence.thrift.service.MyService.Processor in project providence by morimekta.

the class SocketServerTest method setUpClass.

@BeforeClass
public static void setUpClass() {
    setDefaultPollDelay(20, TimeUnit.MILLISECONDS);
    impl = mock(Iface.class);
    instrumentation = mock(ServiceCallInstrumentation.class);
    server = SocketServer.builder(new Processor(impl)).withSerializer(new BinarySerializer(true)).withInstrumentation(instrumentation).withMaxBacklog(1).withThreadFactory(new ThreadFactoryBuilder().setDaemon(true).setNameFormat("test-%d").build()).withWorkerThreads(1).withClientTimeout(200).start();
    port = server.getPort();
}
Also used : Iface(net.morimekta.test.providence.thrift.service.MyService.Iface) Processor(net.morimekta.test.providence.thrift.service.MyService.Processor) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) ServiceCallInstrumentation(net.morimekta.providence.util.ServiceCallInstrumentation) BinarySerializer(net.morimekta.providence.serializer.BinarySerializer) BeforeClass(org.junit.BeforeClass)

Aggregations

ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 BinarySerializer (net.morimekta.providence.serializer.BinarySerializer)1 ServiceCallInstrumentation (net.morimekta.providence.util.ServiceCallInstrumentation)1 Iface (net.morimekta.test.providence.thrift.service.MyService.Iface)1 Processor (net.morimekta.test.providence.thrift.service.MyService.Processor)1 BeforeClass (org.junit.BeforeClass)1