NO-JIRA Intermittent failures fix

This commit is contained in:
Clebert Suconic 2020-04-29 08:42:20 -04:00
parent c0daaf6fbf
commit ea2edfbb7d
7 changed files with 14 additions and 13 deletions

View File

@ -47,8 +47,8 @@ import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledV
import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledVerifier.MESSAGE_ACKED;
import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledVerifier.MESSAGE_EXPIRED;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@ -74,7 +74,7 @@ public class AmqpPluginTest extends AmqpClientTestSupport {
protected static final Logger LOG = LoggerFactory.getLogger(AmqpPluginTest.class);
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
@Override

View File

@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;
@ -100,7 +101,7 @@ public class CorePluginTest extends JMSTestBase {
private Queue queue;
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
private final ConfigurationVerifier configurationVerifier = new ConfigurationVerifier();
public static final String INVM_CONNECTOR_FACTORY = InVMConnectorFactory.class.getCanonicalName();

View File

@ -23,8 +23,8 @@ import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.Topic;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.api.core.SimpleString;
@ -56,7 +56,7 @@ public class FederationBrokerPluginTest extends FederatedTestBase {
@Rule
public RetryRule retryRule = new RetryRule(2);
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier0 = new MethodCalledVerifier(methodCalls);
@Override

View File

@ -5,8 +5,8 @@ package org.apache.activemq.artemis.tests.integration.plugin;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import com.google.common.base.Preconditions;
@ -120,7 +120,7 @@ public class MethodCalledVerifier implements ActiveMQServerPlugin {
}
public MethodCalledVerifier() {
this(new HashMap<String, AtomicInteger>());
this(new ConcurrentHashMap<>());
}
@Override

View File

@ -16,8 +16,8 @@
*/
package org.apache.activemq.artemis.tests.integration.plugin;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@ -61,7 +61,7 @@ import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledV
public class MqttPluginTest extends MQTTTestSupport {
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
@Override

View File

@ -49,8 +49,8 @@ import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledV
import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledVerifier.MESSAGE_ACKED;
import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledVerifier.MESSAGE_EXPIRED;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.JMSException;
@ -71,7 +71,7 @@ import org.junit.Test;
public class OpenwirePluginTest extends BasicOpenWireTest {
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
@Override

View File

@ -51,8 +51,8 @@ import static org.apache.activemq.artemis.tests.integration.plugin.MethodCalledV
import java.net.URI;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -109,7 +109,7 @@ public class StompPluginTest extends StompTestBase {
}
}
private final Map<String, AtomicInteger> methodCalls = new HashMap<>();
private final Map<String, AtomicInteger> methodCalls = new ConcurrentHashMap<>();
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
private final AtomicBoolean stompBeforeCreateSession = new AtomicBoolean();
private final AtomicBoolean stompBeforeRemoveSession = new AtomicBoolean();