Made port public constant

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2018-10-27 14:02:21 -04:00
parent 0e422a81ce
commit 171f79518d

View File

@ -46,6 +46,7 @@ import net.bigeon.gclc.ConsoleApplication;
@SuppressWarnings({ "javadoc", "nls" })
public class TestServer {
public static final int PORT = 3300;
private static SocketConsoleApplicationShell SHELL;
private static ConnexionManager<Socket> manager;
@ -75,7 +76,7 @@ public class TestServer {
input.setPrompt("> \n");
output = new PluggableConsoleOutput();
manager = new DConnexionManager<>();
SHELL = new SocketConsoleApplicationShell(3300,
SHELL = new SocketConsoleApplicationShell(PORT,
InetAddress.getByName("127.0.0.1"));
final ConsoleApplication app = ConsoleTestApplication.create(output, input,
manager);
@ -91,13 +92,13 @@ public class TestServer {
});
th.start();
try {
Object waiting = new Object();
final Object waiting = new Object();
synchronized (waiting) {
while (!input.isPrompting()) {
waiting.wait(50);
}
}
} catch (InterruptedException e) {
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
}
}