proxy progress
This commit is contained in:
parent
800e6021f8
commit
9c6d71efd3
|
@ -56,9 +56,8 @@ public class TcpIoStream implements IoStream {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setInputListener(final DataListener listener) {
|
public void setInputListener(final DataListener listener) {
|
||||||
ByteReader reader = buffer -> input.read(buffer);
|
|
||||||
|
|
||||||
ByteReader.runReaderLoop(listener, reader, logger);
|
ByteReader.runReaderLoop(listener, input::read, logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class TcpCommunicationIntegrationTest {
|
||||||
System.out.println("Failed");
|
System.out.println("Failed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
assertTrue(connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
|
assertTrue("Connection established", connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
|
||||||
|
|
||||||
assertEquals(0, server.unknownCommands.get());
|
assertEquals(0, server.unknownCommands.get());
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class TcpCommunicationIntegrationTest {
|
||||||
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);
|
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);
|
||||||
|
|
||||||
LinkManager clientManager = new LinkManager(LOGGER);
|
LinkManager clientManager = new LinkManager(LOGGER);
|
||||||
clientManager.startAndConnect(Integer.toString(proxyPort), new ConnectionStateListener() {
|
clientManager.startAndConnect(LOCALHOST + ":" + proxyPort, new ConnectionStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConnectionEstablished() {
|
public void onConnectionEstablished() {
|
||||||
connectionEstablishedCountDownLatch.countDown();
|
connectionEstablishedCountDownLatch.countDown();
|
||||||
|
@ -123,7 +123,7 @@ public class TcpCommunicationIntegrationTest {
|
||||||
System.out.println("Failed");
|
System.out.println("Failed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
assertTrue(connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
|
assertTrue("Connection established", connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
|
||||||
|
|
||||||
clientManager.stop();
|
clientManager.stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue