so suddenly ServerTest is less reliable?

This commit is contained in:
rusefi 2020-07-19 01:12:10 -04:00
parent bd6dac1f5e
commit 879fdecd67
4 changed files with 5 additions and 5 deletions

View File

@ -208,7 +208,7 @@ public class LinkManager implements Closeable {
int portPart = TcpConnector.getTcpPort(port);
String hostname = TcpConnector.getHostname(port);
socket = new Socket(hostname, portPart);
TcpIoStream tcpIoStream = new TcpIoStream(logger, socket);
TcpIoStream tcpIoStream = new TcpIoStream("[start] ", logger, socket);
return tcpIoStream;
} catch (Throwable e) {

View File

@ -23,7 +23,7 @@ public class BinaryProtocolProxy {
@Override
public void run() {
try {
TcpIoStream clientStream = new TcpIoStream(logger, clientSocket);
TcpIoStream clientStream = new TcpIoStream("[[proxy]] ", logger, clientSocket);
runProxy(targetEcuSocket, clientStream);
} catch (IOException e) {
e.printStackTrace();

View File

@ -50,7 +50,7 @@ public class TestHelper {
public static IoStream secureConnectToLocalhost(int controllerPort, Logger logger) {
IoStream targetEcuSocket;
try {
targetEcuSocket = new TcpIoStream(logger, rusEFISSLContext.getSSLSocket(ProxyClient.LOCALHOST, controllerPort));
targetEcuSocket = new TcpIoStream("[local]", logger, rusEFISSLContext.getSSLSocket(ProxyClient.LOCALHOST, controllerPort));
} catch (IOException e) {
throw new IllegalStateException("Failed to connect to controller " + ProxyClient.LOCALHOST + ":" + controllerPort);
}
@ -61,7 +61,7 @@ public class TestHelper {
public static IoStream connectToLocalhost(int controllerPort, Logger logger) {
IoStream targetEcuSocket;
try {
targetEcuSocket = new TcpIoStream(logger, new Socket(ProxyClient.LOCALHOST, controllerPort));
targetEcuSocket = new TcpIoStream("[local]", logger, new Socket(ProxyClient.LOCALHOST, controllerPort));
} catch (IOException e) {
throw new IllegalStateException("Failed to connect to controller " + ProxyClient.LOCALHOST + ":" + controllerPort);
}

View File

@ -133,7 +133,7 @@ public class Backend implements Closeable {
if (applicationClientStream != null)
applicationClientStream.close();
e.printStackTrace();
logger.error("Got error " + e);
logger.info("Got error " + e);
onDisconnectApplication();
}
}