Skip to content

Commit

Permalink
Issue #6327 Remove/re-enable disabled ShutdownMonitorTest tests (#6630)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bartel <janb@webtide.com>
  • Loading branch information
janbartel committed Sep 2, 2021
1 parent e2690cc commit db1c655
Showing 1 changed file with 1 addition and 16 deletions.
Expand Up @@ -68,21 +68,8 @@ public void testStatus() throws Exception
}
}

@Disabled("Issue #2626")
@Test
public void testStartStopDifferentPortDifferentKey() throws Exception
{
testStartStop(false);
}

@Disabled("Issue #2626")
@Test
public void testStartStopSamePortDifferentKey() throws Exception
{
testStartStop(true);
}

private void testStartStop(boolean reusePort) throws Exception
{
ShutdownMonitor monitor = ShutdownMonitor.getInstance();
// monitor.setDebug(true);
Expand All @@ -100,7 +87,7 @@ private void testStartStop(boolean reusePort) throws Exception
assertTrue(!monitor.isAlive());

// Should be able to change port and key because it is stopped.
monitor.setPort(reusePort ? port : 0);
monitor.setPort(0);
String newKey = "foo";
monitor.setKey(newKey);
monitor.start();
Expand Down Expand Up @@ -150,7 +137,6 @@ public void testForceStopCommand() throws Exception
public void testOldStopCommandWithStopOnShutdownTrue() throws Exception
{
ShutdownMonitor monitor = ShutdownMonitor.getInstance();
// monitor.setDebug(true);
monitor.setPort(0);
monitor.setExitVm(false);
monitor.start();
Expand Down Expand Up @@ -211,7 +197,6 @@ public void testOldStopCommandWithStopOnShutdownFalse() throws Exception

public void stop(String command, int port, String key, boolean check) throws Exception
{
// System.out.printf("Attempting to send " + command + " to localhost:%d (%b)%n", port, check);
try (Socket s = new Socket(InetAddress.getByName("127.0.0.1"), port))
{
// send stop command
Expand Down

0 comments on commit db1c655

Please sign in to comment.