NO-JIRA Adding retry on console tests

This commit is contained in:
Clebert Suconic 2023-05-18 11:07:27 -04:00
parent b664022a1e
commit 1e8b5cbd72
6 changed files with 30 additions and 0 deletions

View File

@ -19,12 +19,14 @@ package org.apache.activemq.artemis.tests.smoke.console;
import com.github.dockerjava.zerodep.shaded.org.apache.hc.core5.ssl.SSLContexts;
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
import org.apache.activemq.artemis.util.ServerUtil;
import org.apache.activemq.artemis.utils.RetryRule;
import org.apache.activemq.artemis.utils.Wait;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import javax.net.ssl.SSLContext;
@ -32,6 +34,9 @@ import java.io.File;
public class ConsoleMutualSSLTest extends SmokeTestBase {
@Rule
public RetryRule retryRule = new RetryRule(2);
protected static final String SERVER_NAME = "console-mutual-ssl";
protected static final String SERVER_ADMIN_USERNAME = "admin";
protected static final String SERVER_ADMIN_PASSWORD = "admin";

View File

@ -29,9 +29,11 @@ import java.util.function.Function;
import org.apache.activemq.artemis.cli.commands.Create;
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
import org.apache.activemq.artemis.util.ServerUtil;
import org.apache.activemq.artemis.utils.RetryRule;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.openqa.selenium.MutableCapabilities;
@ -51,6 +53,9 @@ import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
@RunWith(Parameterized.class)
public abstract class ConsoleTest extends SmokeTestBase {
@Rule
public RetryRule retryRule = new RetryRule(2);
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
protected static final String SERVER_NAME = "console";

View File

@ -17,11 +17,16 @@
package org.apache.activemq.artemis.tests.smoke.console;
import org.apache.activemq.artemis.tests.smoke.console.pages.LoginPage;
import org.apache.activemq.artemis.utils.RetryRule;
import org.junit.Rule;
import org.junit.Test;
import org.openqa.selenium.MutableCapabilities;
public class LoginTest extends ConsoleTest {
@Rule
public RetryRule retryRule = new RetryRule(2);
private static final String DEFAULT_CONSOLE_LOGIN_BRAND_IMAGE = "/activemq-branding/plugin/img/activemq.png";
public LoginTest(MutableCapabilities browserOptions) {

View File

@ -29,8 +29,10 @@ import org.apache.activemq.artemis.tests.smoke.console.pages.QueuePage;
import org.apache.activemq.artemis.tests.smoke.console.pages.QueuesPage;
import org.apache.activemq.artemis.tests.smoke.console.pages.SendMessagePage;
import org.apache.activemq.artemis.tests.smoke.console.pages.StatusPage;
import org.apache.activemq.artemis.utils.RetryRule;
import org.apache.activemq.artemis.utils.Wait;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@ -41,6 +43,9 @@ import javax.management.ObjectName;
@RunWith(Parameterized.class)
public class QueuesTest extends ConsoleTest {
@Rule
public RetryRule retryRule = new RetryRule(2);
public QueuesTest(MutableCapabilities browserOptions) {
super(browserOptions);
}

View File

@ -16,12 +16,17 @@
*/
package org.apache.activemq.artemis.tests.smoke.console;
import org.apache.activemq.artemis.utils.RetryRule;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.openqa.selenium.MutableCapabilities;
public class RootTest extends ConsoleTest {
@Rule
public RetryRule retryRule = new RetryRule(2);
public RootTest(MutableCapabilities browserOptions) {
super(browserOptions);
}

View File

@ -17,6 +17,8 @@
package org.apache.activemq.artemis.tests.smoke.console;
import org.apache.activemq.artemis.tests.smoke.console.pages.LoginPage;
import org.apache.activemq.artemis.utils.RetryRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@ -27,6 +29,9 @@ import org.openqa.selenium.NoSuchElementException;
@RunWith(Parameterized.class)
public class TabsTest extends ConsoleTest {
@Rule
public RetryRule retryRule = new RetryRule(2);
public TabsTest(MutableCapabilities browserOptions) {
super(browserOptions);
}