Beispiel #1
0
 private void startServer(final ThriftServerDefBuilder thriftServerDefBuilder) {
   server =
       new NettyServerTransport(
           thriftServerDefBuilder.build(),
           NettyServerConfig.newBuilder().build(),
           new DefaultChannelGroup());
   server.start();
   port = ((InetSocketAddress) server.getServerChannel().getLocalAddress()).getPort();
 }
Beispiel #2
0
 @AfterMethod(alwaysRun = true)
 public void teardown() throws InterruptedException {
   if (server != null) {
     server.stop();
   }
 }