From 671f48fb31a6bd880d344c719c3c532b510efe6c Mon Sep 17 00:00:00 2001 From: Alexey Markevich Date: Wed, 19 Jul 2023 20:25:13 +0200 Subject: [PATCH] NO-JIRA remove unused SmokeTestBase#waitForServerToStart --- .../tests/smoke/common/SmokeTestBase.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/SmokeTestBase.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/SmokeTestBase.java index ef8ef63034..2bdaecfe4f 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/SmokeTestBase.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/SmokeTestBase.java @@ -30,9 +30,7 @@ import java.util.Set; import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl; import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder; -import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient; import org.apache.activemq.artemis.cli.commands.Stop; -import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.util.ServerUtil; import org.junit.After; @@ -158,24 +156,6 @@ public class SmokeTestBase extends ActiveMQTestBase { recreateDirectory(homeInstance + "/log"); } - - public boolean waitForServerToStart(String uri, String username, String password, long timeout) throws InterruptedException { - long realTimeout = System.currentTimeMillis() + timeout; - while (System.currentTimeMillis() < realTimeout) { - try (ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactory(uri, null)) { - cf.createConnection(username, password).close(); - System.out.println("server " + uri + " started"); - } catch (Exception e) { - System.out.println("awaiting server " + uri + " start at "); - Thread.sleep(500); - continue; - } - return true; - } - - return false; - } - protected void checkLogRecord(File logFile, boolean exist, String... values) throws Exception { Assert.assertTrue(logFile.exists()); boolean hasRecord = false;