so suddenly ServerTest is less reliable?
This commit is contained in:
parent
bd6dac1f5e
commit
879fdecd67
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue