result = runServer(0, new String[]{
"-web", "-webPort", "9002", "-webAllowOthers", "-webSSL",
"-pg", "-pgAllowOthers", "-pgPort", "9003",
"-tcp", "-tcpAllowOthers", "-tcpPort", "9006", "-tcpPassword", "abc"});
Server stop = server;
assertTrue(result.indexOf("https://") >= 0);
assertTrue(result.indexOf(":9002") >= 0);
assertTrue(result.indexOf("pg://") >= 0);
assertTrue(result.indexOf(":9003") >= 0);
assertTrue(result.indexOf("others can") >= 0);
assertTrue(result.indexOf("only local") < 0);
assertTrue(result.indexOf("tcp://") >= 0);
assertTrue(result.indexOf(":9006") >= 0);
conn = DriverManager.getConnection("jdbc:h2:tcp://localhost:9006/mem:", "sa", "sa");
conn.close();
result = runServer(0, new String[]{"-tcpShutdown", "tcp://localhost:9006", "-tcpPassword", "abc", "-tcpShutdownForce"});
assertTrue(result.indexOf("Shutting down") >= 0);
stop.shutdown();
assertThrows(ErrorCode.CONNECTION_BROKEN_1, this).
getConnection("jdbc:h2:tcp://localhost:9006/mem:", "sa", "sa");
}