/** * @throws IOException * @throws URISyntaxException * @throws Exception */ private void startTransportServer() throws IOException, URISyntaxException, Exception { server = TransportFactory.bind( new URI("tcp://localhost:0?trace=true&wireFormat.maxInactivityDuration=1000")); server.setAcceptListener(this); server.start(); serverPort = server.getSocketAddress().getPort(); }
protected void tearDown() throws Exception { ignoreClientError.set(true); ignoreServerError.set(true); try { if (clientTransport != null) { clientTransport.stop(); } if (serverTransport != null) { serverTransport.stop(); } if (server != null) { server.stop(); } } catch (Throwable e) { e.printStackTrace(); } super.tearDown(); }