Skip to content

Commit

Permalink
Merge pull request #3062 from chanikag/jmstestissue
Browse files Browse the repository at this point in the history
Fix intermittent test failure
  • Loading branch information
chanikag authored Dec 20, 2023
2 parents d14870d + 9c5cde0 commit 954f503
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ public static void stopMQServer() {
activeMqBroker.stop();

}

public static boolean isMQServerStarted() {
return activeMqBroker.isBrokerStarted();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.extensions.servers.jmsserver.controller.config.JMSBrokerConfigurationProvider;
import org.wso2.carbon.automation.extensions.servers.tomcatserver.TomcatServerManager;
import org.wso2.carbon.automation.extensions.servers.tomcatserver.TomcatServerType;
import org.wso2.carbon.automation.test.utils.http.client.HttpRequestUtil;
import org.wso2.carbon.automation.test.utils.http.client.HttpResponse;
import org.wso2.carbon.esb.jms.utils.JMSBroker;
import org.wso2.esb.integration.common.extensions.jmsserver.ActiveMQServerExtension;
import org.wso2.esb.integration.common.utils.CarbonLogReader;
import org.wso2.esb.integration.common.utils.ESBIntegrationTest;
import org.wso2.esb.integration.services.jaxrs.customersample.CustomerConfig;
Expand All @@ -52,6 +55,9 @@ public class MSMPCronForwarderCase extends ESBIntegrationTest {
protected void init() throws Exception {
// START THE ESB
super.init();
if (!ActiveMQServerExtension.isMQServerStarted()) {
ActiveMQServerExtension.startMQServer();
}
carbonLogReader.start();
}

Expand Down

0 comments on commit 954f503

Please sign in to comment.