diff --git a/src/main/java/io/openliberty/tools/intellij/util/DebugModeHandler.java b/src/main/java/io/openliberty/tools/intellij/util/DebugModeHandler.java index b846d4eca..fd94da5bd 100644 --- a/src/main/java/io/openliberty/tools/intellij/util/DebugModeHandler.java +++ b/src/main/java/io/openliberty/tools/intellij/util/DebugModeHandler.java @@ -165,7 +165,8 @@ private void createAndRunDebugConfiguration(ProgressIndicator indicator, Liberty */ private String waitForSocketActivation(ProgressIndicator monitor, LibertyModule libertyModule, String host, int debugPort) throws Exception { byte[] handshakeString = "JDWP-Handshake".getBytes(StandardCharsets.US_ASCII); - int retryLimit = 60; // wait up to 3 minutes for dev mode to start (polling rate 20 per minute, 3s) + int retryLimit = 3600; // seconds to wait for Liberty dev mode to start. It can take 4-5 minutes during testing. + int retryInc = 3; // time to wait after each try // Retrieve the location of the server.env in the liberty installation at the default location (wpl/usr/servers/). Path serverEnvPath = getServerEnvPath(libertyModule); @@ -173,7 +174,7 @@ private String waitForSocketActivation(ProgressIndicator monitor, LibertyModule boolean cleanStart = serverEnvPath == null; Path serverEnvBakPath = null; - for (int retryCount = 0; retryCount < retryLimit; retryCount++) { + for (int retryCount = 0; retryCount < retryLimit; retryCount+=retryInc) { // check if cancelled if (monitor.isCanceled()) { return null; @@ -210,7 +211,7 @@ private String waitForSocketActivation(ProgressIndicator monitor, LibertyModule LOGGER.trace(String.format("ConnectException waiting for runtime to start on port %d", debugPort)); } } - TimeUnit.SECONDS.sleep(3); + TimeUnit.SECONDS.sleep(retryInc); } throw new Exception(LocalizedResourceUtil.getMessage("cannot.attach.debugger.host.port", host, String.format("%d",debugPort))); }