proxy progress

This commit is contained in:
rusefi 2020-07-08 16:30:31 -04:00
parent 98f0f145d5
commit 06f9faccf5
2 changed files with 4 additions and 5 deletions

View File

@ -56,9 +56,8 @@ public class TcpIoStream implements IoStream {
@Override
public void setInputListener(final DataListener listener) {
ByteReader reader = buffer -> input.read(buffer);
ByteReader.runReaderLoop(listener, reader, logger);
ByteReader.runReaderLoop(listener, input::read, logger);
}
@Override

View File

@ -78,7 +78,7 @@ public class TcpCommunicationIntegrationTest {
System.out.println("Failed");
}
});
assertTrue(connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
assertTrue("Connection established", connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
assertEquals(0, server.unknownCommands.get());
@ -112,7 +112,7 @@ public class TcpCommunicationIntegrationTest {
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);
LinkManager clientManager = new LinkManager(LOGGER);
clientManager.startAndConnect(Integer.toString(proxyPort), new ConnectionStateListener() {
clientManager.startAndConnect(LOCALHOST + ":" + proxyPort, new ConnectionStateListener() {
@Override
public void onConnectionEstablished() {
connectionEstablishedCountDownLatch.countDown();
@ -123,7 +123,7 @@ public class TcpCommunicationIntegrationTest {
System.out.println("Failed");
}
});
assertTrue(connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
assertTrue("Connection established", connectionEstablishedCountDownLatch.await(30, TimeUnit.SECONDS));
clientManager.stop();
}