From a0dc9861a025e97812f21b4d91df09f4169bf6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 21 Dec 2015 17:24:17 +0200 Subject: [PATCH] Access static members directly --- .../activemq/artemis/tests/util/RandomUtil.java | 2 +- .../artemis/util/ConcurrentHashSetTest.java | 2 +- .../util/TypedPropertiesConversionTest.java | 2 +- .../artemis/util/TypedPropertiesTest.java | 2 +- .../artemis/uri/ConnectionFactoryURITest.java | 2 +- .../core/protocol/openwire/amq/AMQSession.java | 4 ++-- .../artemis/rest/queue/ConsumedMessage.java | 3 ++- .../rest/queue/ConsumedObjectMessage.java | 3 ++- .../activemq/artemis/rest/queue/PostMessage.java | 2 +- .../artemis/core/server/impl/QueueImpl.java | 6 +++--- .../core/config/impl/ConfigurationImplTest.java | 2 +- .../artemis/core/config/impl/ValidatorsTest.java | 2 +- .../artemis/core/filter/impl/FilterTest.java | 2 +- .../impl/ScheduledDeliveryHandlerTest.java | 2 +- .../artemis/tests/util/ActiveMQTestBase.java | 1 + .../artemis/tests/util/SimpleStringTest.java | 1 + .../activemq/ActiveMQConnectionFactory.java | 4 ++-- .../broker/store/RecoverExpiredMessagesTest.java | 3 ++- .../org/apache/activemq/bugs/AMQ1936Test.java | 5 +++-- .../org/apache/activemq/bugs/AMQ2383Test.java | 4 ++-- .../org/apache/activemq/bugs/AMQ5567Test.java | 5 +++-- .../TransactedStoreUsageSuspendResumeTest.java | 4 ++-- .../openwire/ItStillMarshallsTheSameTest.java | 2 +- .../discovery/DiscoveryNetworkReconnectTest.java | 3 +-- .../byteman/ConcurrentDeliveryCancelTest.java | 2 +- .../tests/extras/byteman/MessageCopyTest.java | 2 +- .../MDBMultipleHandlersServerDisconnectTest.java | 2 +- .../hornetq/HornetQProtocolManagerTest.java | 4 ++-- .../tests/integration/String64KLimitTest.java | 2 +- .../integration/client/ConsumerCloseTest.java | 2 +- .../client/DeadLetterAddressTest.java | 2 +- .../integration/client/DurableQueueTest.java | 2 +- .../integration/client/ExpiryAddressTest.java | 15 +++++++-------- .../InVMNonPersistentMessageBufferTest.java | 2 +- .../client/LargeMessageCompressTest.java | 2 +- .../client/MessageConcurrencyTest.java | 2 +- .../client/MessageDurabilityTest.java | 2 +- .../client/MessageExpirationTest.java | 2 +- .../integration/client/MessagePriorityTest.java | 2 +- .../integration/client/ProducerCloseTest.java | 2 +- .../client/ProducerFlowControlTest.java | 2 +- .../tests/integration/client/RequestorTest.java | 2 +- .../client/SelfExpandingBufferTest.java | 2 +- .../integration/client/SessionCloseTest.java | 16 +++++++++------- .../integration/client/SessionFactoryTest.java | 2 +- .../client/SimpleSendMultipleQueuesTest.java | 2 +- .../integration/client/SlowConsumerTest.java | 2 +- .../integration/client/TemporaryQueueTest.java | 2 +- .../integration/client/TransientQueueTest.java | 2 +- .../integration/clientcrash/ClientExitTest.java | 2 +- .../integration/cluster/bridge/BridgeTest.java | 2 +- .../cluster/failover/FailoverTest.java | 2 +- .../MultiThreadRandomReattachTestBase.java | 2 +- .../topology/TopologyClusterTestBase.java | 2 +- .../discovery/DiscoveryStayAliveTest.java | 2 +- .../integration/discovery/DiscoveryTest.java | 2 +- .../tests/integration/divert/DivertTest.java | 6 +++--- .../jms/ActiveMQConnectionFactoryTest.java | 2 +- .../jms/client/NoLocalSubscriberTest.java | 2 +- .../integration/jms/client/TextMessageTest.java | 2 +- .../jms/cluster/JMSFailoverListenerTest.java | 2 +- .../integration/jms/cluster/JMSFailoverTest.java | 2 +- .../jms/cluster/JMSReconnectTest.java | 2 +- .../ConnectionFactorySerializationTest.java | 2 +- .../jms/server/config/JMSConfigurationTest.java | 2 +- .../server/management/JMSQueueControlTest.java | 2 +- .../server/management/JMSServerControl2Test.java | 2 +- .../management/JMSServerControlRestartTest.java | 2 +- .../server/management/JMSServerControlTest.java | 2 +- .../jms/server/management/JMSUtil.java | 2 +- .../jms/server/management/TopicControlTest.java | 2 +- .../management/TopicControlUsingJMSTest.java | 2 +- .../management/AcceptorControlTest.java | 2 +- .../management/ActiveMQServerControlTest.java | 2 +- .../management/AddressControlTest.java | 2 +- .../management/AddressControlUsingCoreTest.java | 2 +- .../management/BridgeControlTest.java | 2 +- .../management/BridgeControlUsingCoreTest.java | 2 +- .../management/BroadcastGroupControlTest.java | 2 +- .../ClusterConnectionControl2Test.java | 2 +- .../management/ClusterConnectionControlTest.java | 2 +- .../management/DivertControlTest.java | 2 +- .../management/ManagementHelperTest.java | 2 +- .../management/ManagementServiceImplTest.java | 2 +- .../ManagementWithPagingServerTest.java | 2 +- .../management/ManagementWithStompTest.java | 2 +- .../integration/management/NotificationTest.java | 2 +- .../integration/management/QueueControlTest.java | 7 +++---- .../management/SecurityNotificationTest.java | 2 +- .../paging/PageCountSyncOnNonTXTest.java | 4 ++-- .../PagingWithFailoverAndCountersTest.java | 6 +++--- .../persistence/DuplicateCacheTest.java | 2 +- ...onnectionFactoryConfigurationStorageTest.java | 2 +- ...ransportConfigurationEncodingSupportTest.java | 2 +- .../replication/ReplicationOrderTest.java | 2 +- .../tests/integration/security/SimpleClient.java | 2 +- .../ssl/CoreClientOverOneWaySSLTest.java | 2 +- .../ssl/CoreClientOverTwoWaySSLTest.java | 2 +- .../tests/integration/stomp/StompTest.java | 2 +- .../journal/JournalCleanupCompactStressTest.java | 2 +- .../stress/journal/JournalRestartStressTest.java | 2 +- .../stress/paging/PageCursorStressTest.java | 2 +- .../tests/stress/remote/PingStressTest.java | 2 +- .../jms/bridge/impl/JMSBridgeImplTest.java | 2 +- .../core/client/impl/LargeMessageBufferTest.java | 2 +- .../core/journal/impl/JournalImplTestUnit.java | 2 +- .../unit/core/message/impl/MessageImplTest.java | 2 +- .../core/paging/impl/PagingManagerImplTest.java | 2 +- .../core/paging/impl/PagingStoreImplTest.java | 2 +- .../impl/DuplicateDetectionUnitTest.java | 2 +- .../core/remoting/ActiveMQBufferTestBase.java | 2 +- .../cluster/impl/RemoteQueueBindImplTest.java | 2 +- .../tests/unit/jms/ActiveMQDestinationTest.java | 2 +- .../unit/jms/client/ActiveMQMapMessageTest.java | 2 +- .../jms/client/ActiveMQStreamMessageTest.java | 2 +- .../DestinationObjectFactoryTest.java | 2 +- .../artemis/tests/unit/util/UTF8Test.java | 2 +- 117 files changed, 152 insertions(+), 146 deletions(-) diff --git a/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/util/RandomUtil.java b/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/util/RandomUtil.java index d34cd0cfde..b47e216e69 100644 --- a/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/util/RandomUtil.java +++ b/artemis-core-client/src/test/java/org/apache/activemq/artemis/tests/util/RandomUtil.java @@ -22,6 +22,6 @@ import org.apache.activemq.artemis.core.transaction.impl.XidImpl; public class RandomUtil extends org.apache.activemq.artemis.utils.RandomUtil { public static Xid randomXid() { - return new XidImpl(RandomUtil.randomBytes(), RandomUtil.randomInt(), RandomUtil.randomBytes()); + return new XidImpl(randomBytes(), randomInt(), randomBytes()); } } diff --git a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/ConcurrentHashSetTest.java b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/ConcurrentHashSetTest.java index 6c97afdd0c..79ffa06c12 100644 --- a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/ConcurrentHashSetTest.java +++ b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/ConcurrentHashSetTest.java @@ -16,9 +16,9 @@ */ package org.apache.activemq.artemis.util; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.ConcurrentHashSet; import org.apache.activemq.artemis.utils.ConcurrentSet; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesConversionTest.java b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesConversionTest.java index 56ec47fa9f..e4e8c5954f 100644 --- a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesConversionTest.java +++ b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesConversionTest.java @@ -18,7 +18,7 @@ package org.apache.activemq.artemis.util; import org.apache.activemq.artemis.api.core.ActiveMQPropertyConversionException; import org.apache.activemq.artemis.api.core.SimpleString; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.TypedProperties; import org.junit.Assert; import org.junit.Before; diff --git a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesTest.java b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesTest.java index 894399bf88..cc31e75937 100644 --- a/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesTest.java +++ b/artemis-core-client/src/test/java/org/apache/activemq/artemis/util/TypedPropertiesTest.java @@ -21,7 +21,7 @@ import java.util.Iterator; import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.api.core.ActiveMQBuffers; import org.apache.activemq.artemis.api.core.SimpleString; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.TypedProperties; import org.junit.Assert; import org.junit.Before; diff --git a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java index 9f0fd18604..caf284d2d6 100644 --- a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java +++ b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/uri/ConnectionFactoryURITest.java @@ -46,7 +46,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQQueueConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQTopicConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQXAQueueConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQXATopicConnectionFactory; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.commons.beanutils.BeanUtilsBean; import org.junit.Assert; import org.junit.Test; diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java index b4d04b76c9..a388f50375 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java @@ -259,8 +259,8 @@ public class AMQSession implements SessionCallback { * not receive acks will be resent. (ActiveMQ broker handles this by returning a last sequence id received to * the client). To handle this in Artemis we use a duplicate ID cache. To do this we check to see if the * message comes from failover connection. If so we add a DUPLICATE_ID to handle duplicates after a resend. */ - if (producerExchange.getConnectionContext().isFaultTolerant() && !messageSend.getProperties().containsKey(ServerMessage.HDR_DUPLICATE_DETECTION_ID)) { - coreMsg.putStringProperty(ServerMessage.HDR_DUPLICATE_DETECTION_ID.toString(), messageSend.getMessageId().toString()); + if (producerExchange.getConnectionContext().isFaultTolerant() && !messageSend.getProperties().containsKey(org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID)) { + coreMsg.putStringProperty(org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID.toString(), messageSend.getMessageId().toString()); } OpenWireMessageConverter.toCoreMessage(coreMsg, messageSend, connection.getMarshaller()); SimpleString address = OpenWireUtil.toCoreAddress(dest); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedMessage.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedMessage.java index 9c5b7a46a0..3c499120d4 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedMessage.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedMessage.java @@ -16,6 +16,7 @@ */ package org.apache.activemq.artemis.rest.queue; +import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.client.ClientMessage; import org.apache.activemq.artemis.rest.HttpHeaderProperty; @@ -55,7 +56,7 @@ public abstract class ConsumedMessage { if (aBoolean != null && aBoolean.booleanValue()) { return new ConsumedHttpMessage(message); } - else if (message.getType() == ClientMessage.OBJECT_TYPE) { + else if (message.getType() == Message.OBJECT_TYPE) { return new ConsumedObjectMessage(message); } else { diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedObjectMessage.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedObjectMessage.java index 004070ce0f..b03e84fb73 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedObjectMessage.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumedObjectMessage.java @@ -16,6 +16,7 @@ */ package org.apache.activemq.artemis.rest.queue; +import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.client.ClientMessage; import javax.ws.rs.core.Response; @@ -28,7 +29,7 @@ public class ConsumedObjectMessage extends ConsumedMessage { public ConsumedObjectMessage(ClientMessage message) { super(message); - if (message.getType() != ClientMessage.OBJECT_TYPE) + if (message.getType() != Message.OBJECT_TYPE) throw new IllegalArgumentException("Client message must be an OBJECT_TYPE"); } diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/PostMessage.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/PostMessage.java index 6931695412..8c74ea30c6 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/PostMessage.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/PostMessage.java @@ -81,7 +81,7 @@ public class PostMessage { try { ClientProducer producer = pooled.producer; ClientMessage message = createActiveMQMessage(headers, body, durable, ttl, expiration, priority, pooled.session); - message.putStringProperty(ClientMessage.HDR_DUPLICATE_DETECTION_ID.toString(), dup); + message.putStringProperty(Message.HDR_DUPLICATE_DETECTION_ID.toString(), dup); producer.send(message); ActiveMQRestLogger.LOGGER.debug("Sent message: " + message); pool.add(pooled); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index 5d7053e163..18eb0b8b1f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -1106,7 +1106,7 @@ public class QueueImpl implements Queue { List scheduledMessages = scheduledDeliveryHandler.cancel(null); if (scheduledMessages != null && scheduledMessages.size() > 0) { for (MessageReference ref : scheduledMessages) { - ref.getMessage().putLongProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME, ref.getScheduledDeliveryTime()); + ref.getMessage().putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, ref.getScheduledDeliveryTime()); ref.setScheduledDeliveryTime(0); } this.addHead(scheduledMessages); @@ -1607,8 +1607,8 @@ public class QueueImpl implements Queue { @Override public void actMessage(Transaction tx, MessageReference ref) throws Exception { - SimpleString originalMessageAddress = ref.getMessage().getSimpleStringProperty(MessageImpl.HDR_ORIGINAL_ADDRESS); - SimpleString originalMessageQueue = ref.getMessage().getSimpleStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE); + SimpleString originalMessageAddress = ref.getMessage().getSimpleStringProperty(Message.HDR_ORIGINAL_ADDRESS); + SimpleString originalMessageQueue = ref.getMessage().getSimpleStringProperty(Message.HDR_ORIGINAL_QUEUE); if (originalMessageAddress != null) { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java index 441af60e82..425f3262a0 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.config.ha.LiveOnlyPolicyConfiguration; import org.apache.activemq.artemis.core.server.JournalType; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java index 048f1c4b3b..b830a68eea 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java @@ -21,7 +21,7 @@ import org.junit.Test; import org.junit.Assert; import org.apache.activemq.artemis.core.server.JournalType; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; public class ValidatorsTest extends Assert { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java index 0ef4f0232b..18935dd78d 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java @@ -22,8 +22,8 @@ import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.filter.Filter; import org.apache.activemq.artemis.core.server.ServerMessage; import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.SilentTestCase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java index 562fbd1263..49dcbe8f52 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java @@ -46,8 +46,8 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.RoutingContext; import org.apache.activemq.artemis.core.server.ServerMessage; import org.apache.activemq.artemis.core.transaction.Transaction; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.LinkedListIterator; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.ReferenceCounter; import org.apache.activemq.artemis.utils.TypedProperties; import org.apache.activemq.artemis.utils.UUID; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java index 41916fe052..4e0c35fb22 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java @@ -126,6 +126,7 @@ import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager; import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule; import org.apache.activemq.artemis.utils.OrderedExecutorFactory; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.UUIDGenerator; import org.junit.After; import org.junit.Assert; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/SimpleStringTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/SimpleStringTest.java index e5a9dff8c0..7c220da7c5 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/SimpleStringTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/SimpleStringTest.java @@ -24,6 +24,7 @@ import org.junit.Assert; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.utils.DataConstants; +import org.apache.activemq.artemis.utils.RandomUtil; public class SimpleStringTest extends Assert { diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java index da9e91a732..14244ffdca 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java @@ -173,8 +173,8 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne private boolean sendAcksAsync = true; private TransportListener transportListener; private ExceptionListener exceptionListener; - private int auditDepth = ActiveMQMessageAudit.DEFAULT_WINDOW_SIZE; - private int auditMaximumProducerNumber = ActiveMQMessageAudit.MAXIMUM_PRODUCER_COUNT; + private int auditDepth = ActiveMQMessageAuditNoSync.DEFAULT_WINDOW_SIZE; + private int auditMaximumProducerNumber = ActiveMQMessageAuditNoSync.MAXIMUM_PRODUCER_COUNT; private boolean useDedicatedTaskRunner; private long consumerFailoverRedeliveryWaitPeriod = 0; private boolean checkForDuplicates = true; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/RecoverExpiredMessagesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/RecoverExpiredMessagesTest.java index 77c06f63f8..16b0cf6fb4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/RecoverExpiredMessagesTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/RecoverExpiredMessagesTest.java @@ -39,6 +39,7 @@ import org.apache.activemq.command.ProducerInfo; import org.apache.activemq.command.SessionInfo; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.store.PersistenceAdapter; +import org.apache.activemq.store.jdbc.DataSourceServiceSupport; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.IOHelper; @@ -57,7 +58,7 @@ public class RecoverExpiredMessagesTest extends BrokerRestartTestSupport { public void initCombosForTestRecovery() throws Exception { addCombinationValues("queuePendingPolicy", new PendingQueueMessageStoragePolicy[]{new FilePendingQueueMessageStoragePolicy(), new VMPendingQueueMessageStoragePolicy()}); - PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new JDBCPersistenceAdapter(JDBCPersistenceAdapter.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; + PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new JDBCPersistenceAdapter(DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; for (PersistenceAdapter adapter : persistenceAdapters) { adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory())); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java index dac6bf45eb..6e495500fb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1936Test.java @@ -33,6 +33,7 @@ import javax.jms.QueueConnectionFactory; import javax.jms.QueueReceiver; import javax.jms.QueueSender; import javax.jms.QueueSession; +import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.NamingException; @@ -116,7 +117,7 @@ public class AMQ1936Test extends TestCase { // Create the queue connection queueConnection = connectionFactory.createQueueConnection(); - session = queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE); + session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); queue = session.createQueue(TEST_QUEUE_NAME); sender = session.createSender(queue); sender.setDeliveryMode(DeliveryMode.PERSISTENT); @@ -233,7 +234,7 @@ public class AMQ1936Test extends TestCase { queueConnection = connectionFactory.createQueueConnection(); // create a transacted session - session = queueConnection.createQueueSession(TRANSACTED_RECEIVE, QueueSession.AUTO_ACKNOWLEDGE); + session = queueConnection.createQueueSession(TRANSACTED_RECEIVE, Session.AUTO_ACKNOWLEDGE); queue = session.createQueue(TEST_QUEUE_NAME); receiver = session.createReceiver(queue); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java index 4fdfea4382..f4e7908910 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2383Test.java @@ -27,14 +27,14 @@ import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.activemq.command.ActiveMQQueue; +import org.apache.activemq.command.ActiveMQDestination; import org.junit.Test; public class AMQ2383Test { @Test public void activeMQTest() throws Exception { - Destination dest = ActiveMQQueue.createDestination("testQueue", ActiveMQQueue.QUEUE_TYPE); + Destination dest = ActiveMQDestination.createDestination("testQueue", ActiveMQDestination.QUEUE_TYPE); ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.useJmx=false&broker.persistent=false"); Connection producerConnection = factory.createConnection(); producerConnection.start(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java index 10b616845e..5ed211b4fd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java @@ -41,6 +41,7 @@ import org.apache.activemq.command.SessionInfo; import org.apache.activemq.command.XATransactionId; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.store.PersistenceAdapter; +import org.apache.activemq.store.jdbc.DataSourceServiceSupport; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.store.leveldb.LevelDBPersistenceAdapter; @@ -67,7 +68,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport { } public void initCombosForTestPreparedTransactionNotDispatched() throws Exception { - PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new LevelDBPersistenceAdapter(), new JDBCPersistenceAdapter(JDBCPersistenceAdapter.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; + PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new LevelDBPersistenceAdapter(), new JDBCPersistenceAdapter(DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; for (PersistenceAdapter adapter : persistenceAdapters) { adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory())); } @@ -128,7 +129,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport { } public void initCombosForTestCursorStoreSync() throws Exception { - PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new LevelDBPersistenceAdapter(), new JDBCPersistenceAdapter(JDBCPersistenceAdapter.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; + PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{new KahaDBPersistenceAdapter(), new LevelDBPersistenceAdapter(), new JDBCPersistenceAdapter(DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat())}; for (PersistenceAdapter adapter : persistenceAdapters) { adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory())); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactedStoreUsageSuspendResumeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactedStoreUsageSuspendResumeTest.java index 0358bde9a1..db3888a218 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactedStoreUsageSuspendResumeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactedStoreUsageSuspendResumeTest.java @@ -31,7 +31,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; -import org.apache.activemq.TestSupport; +import org.apache.activemq.AutoFailTestSupport; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.junit.After; @@ -146,7 +146,7 @@ public class TransactedStoreUsageSuspendResumeTest { boolean allMessagesReceived = messagesReceivedCountDown.await(10, TimeUnit.MINUTES); if (!allMessagesReceived) { - TestSupport.dumpAllThreads("StuckConsumer!"); + AutoFailTestSupport.dumpAllThreads("StuckConsumer!"); } assertTrue("Got all messages: " + messagesReceivedCountDown, allMessagesReceived); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java index 63f8ee2a45..186f028bc8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/ItStillMarshallsTheSameTest.java @@ -21,7 +21,7 @@ import junit.framework.TestCase; public class ItStillMarshallsTheSameTest extends TestCase { public void testAll() throws Exception { - BrokerInfoData.assertAllControlFileAreEqual(); + DataFileGenerator.assertAllControlFileAreEqual(); } } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java index c63177bf15..48aa82bc7c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java @@ -27,7 +27,6 @@ import javax.management.ObjectName; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.jmx.ManagementContext; -import org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgentFactory; import org.apache.activemq.util.SocketProxy; import org.apache.activemq.util.Wait; import org.hamcrest.BaseMatcher; @@ -179,7 +178,7 @@ public class DiscoveryNetworkReconnectTest { brokerB.waitUntilStarted(); // control multicast advertise agent to inject proxy - agent = MulticastDiscoveryAgentFactory.createDiscoveryAgent(new URI(discoveryAddress)); + agent = DiscoveryAgentFactory.createDiscoveryAgent(new URI(discoveryAddress)); agent.registerService(proxy.getUrl().toString()); agent.start(); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java index 52cc9d8af9..f33685ca5b 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java @@ -40,7 +40,7 @@ import org.apache.activemq.artemis.core.transaction.impl.XidImpl; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQSession; import org.apache.activemq.artemis.tests.util.JMSTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.ReusableLatch; import org.jboss.byteman.contrib.bmunit.BMRule; import org.jboss.byteman.contrib.bmunit.BMRules; diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/MessageCopyTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/MessageCopyTest.java index 5d7f5cd92a..4387e23b8e 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/MessageCopyTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/MessageCopyTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.jboss.byteman.contrib.bmunit.BMRule; import org.jboss.byteman.contrib.bmunit.BMRules; import org.jboss.byteman.contrib.bmunit.BMUnitRunner; diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java index 2d263c060b..ea597ac703 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java @@ -53,7 +53,7 @@ import org.apache.activemq.artemis.ra.inflow.ActiveMQActivation; import org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.integration.ra.ActiveMQRATestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java index f00b6e6bd3..0e425b854a 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java @@ -25,11 +25,11 @@ import javax.jms.Session; import javax.jms.TextMessage; import java.util.concurrent.ConcurrentHashMap; +import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.config.Configuration; -import org.apache.activemq.artemis.core.message.impl.MessageImpl; import org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; @@ -119,7 +119,7 @@ public class HornetQProtocolManagerTest extends ActiveMQTestBase { TextMessage message = session.createTextMessage("Test"); for (int i = 0; i < 5; i++) { - message.setStringProperty(MessageImpl.HDR_DUPLICATE_DETECTION_ID.toString(), "duplicate"); + message.setStringProperty(Message.HDR_DUPLICATE_DETECTION_ID.toString(), "duplicate"); producer.send(message); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/String64KLimitTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/String64KLimitTest.java index a19c58b97f..8a9d586d32 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/String64KLimitTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/String64KLimitTest.java @@ -33,8 +33,8 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; /** * There is a bug in JDK1.3, 1.4 whereby writeUTF fails if more than 64K bytes are written diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java index 5ac324bf83..efcbf1828d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java index 48580f5ebd..95289ec3e4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DurableQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DurableQueueTest.java index 86ed638084..ac0e67427e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DurableQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DurableQueueTest.java @@ -31,8 +31,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; public class DurableQueueTest extends ActiveMQTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ExpiryAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ExpiryAddressTest.java index 5a660f42a5..fc4dec2efd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ExpiryAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ExpiryAddressTest.java @@ -24,13 +24,12 @@ import org.apache.activemq.artemis.api.core.client.ClientProducer; import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; -import org.apache.activemq.artemis.core.message.impl.MessageImpl; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -70,8 +69,8 @@ public class ExpiryAddressTest extends ActiveMQTestBase { clientConsumer = clientSession.createConsumer(eq); m = clientConsumer.receive(500); Assert.assertNotNull(m); - Assert.assertEquals(qName.toString(), m.getStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE)); - Assert.assertEquals(adSend.toString(), m.getStringProperty(MessageImpl.HDR_ORIGINAL_ADDRESS)); + Assert.assertEquals(qName.toString(), m.getStringProperty(Message.HDR_ORIGINAL_QUEUE)); + Assert.assertEquals(adSend.toString(), m.getStringProperty(Message.HDR_ORIGINAL_ADDRESS)); Assert.assertNotNull(m); Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!"); m.acknowledge(); @@ -158,8 +157,8 @@ public class ExpiryAddressTest extends ActiveMQTestBase { Assert.assertNotNull(m); - assertNotNull(m.getStringProperty(MessageImpl.HDR_ORIGINAL_ADDRESS)); - assertNotNull(m.getStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE)); + assertNotNull(m.getStringProperty(Message.HDR_ORIGINAL_ADDRESS)); + assertNotNull(m.getStringProperty(Message.HDR_ORIGINAL_QUEUE)); ExpiryAddressTest.log.info("acking"); m.acknowledge(); @@ -174,8 +173,8 @@ public class ExpiryAddressTest extends ActiveMQTestBase { Assert.assertNotNull(m); - assertNotNull(m.getStringProperty(MessageImpl.HDR_ORIGINAL_ADDRESS)); - assertNotNull(m.getStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE)); + assertNotNull(m.getStringProperty(Message.HDR_ORIGINAL_ADDRESS)); + assertNotNull(m.getStringProperty(Message.HDR_ORIGINAL_QUEUE)); ExpiryAddressTest.log.info("acking"); m.acknowledge(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InVMNonPersistentMessageBufferTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InVMNonPersistentMessageBufferTest.java index 52c2c05f41..8a2f362477 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InVMNonPersistentMessageBufferTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InVMNonPersistentMessageBufferTest.java @@ -25,8 +25,8 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.DataConstants; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageCompressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageCompressTest.java index 0762956895..ae5221f8c8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageCompressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageCompressTest.java @@ -33,7 +33,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java index c9b146497d..c277e0d9a1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java @@ -27,7 +27,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java index 37a1fe90ae..f6e455c971 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageExpirationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageExpirationTest.java index f6525d91fc..9fd6b24045 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageExpirationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageExpirationTest.java @@ -33,8 +33,8 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; public class MessageExpirationTest extends ActiveMQTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessagePriorityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessagePriorityTest.java index f7b5f24a0e..55c83d1378 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessagePriorityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessagePriorityTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java index 324ab17686..e6291bced8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java index 033f4c1d26..eab43cf5df 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java @@ -34,8 +34,8 @@ import org.apache.activemq.artemis.core.settings.HierarchicalRepository; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java index 4c72f418fc..43119cc07a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java index bb92a19178..d613f8b812 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SelfExpandingBufferTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java index db73b84aca..2d30112ee3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java @@ -16,6 +16,8 @@ */ package org.apache.activemq.artemis.tests.integration.client; +import static org.apache.activemq.artemis.tests.util.RandomUtil.randomXid; + import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.ActiveMQExceptionType; import org.apache.activemq.artemis.api.core.SimpleString; @@ -27,7 +29,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -145,28 +147,28 @@ public class SessionCloseTest extends ActiveMQTestBase { ActiveMQTestBase.expectXAException(XAException.XA_RETRY, new ActiveMQAction() { @Override public void run() throws XAException { - session.commit(RandomUtil.randomXid(), RandomUtil.randomBoolean()); + session.commit(randomXid(), RandomUtil.randomBoolean()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { @Override public void run() throws XAException { - session.end(RandomUtil.randomXid(), XAResource.TMSUCCESS); + session.end(randomXid(), XAResource.TMSUCCESS); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { @Override public void run() throws XAException { - session.forget(RandomUtil.randomXid()); + session.forget(randomXid()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { @Override public void run() throws XAException { - session.prepare(RandomUtil.randomXid()); + session.prepare(randomXid()); } }); @@ -180,14 +182,14 @@ public class SessionCloseTest extends ActiveMQTestBase { ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { @Override public void run() throws XAException { - session.rollback(RandomUtil.randomXid()); + session.rollback(randomXid()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { @Override public void run() throws XAException { - session.start(RandomUtil.randomXid(), XAResource.TMNOFLAGS); + session.start(randomXid(), XAResource.TMNOFLAGS); } }); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionFactoryTest.java index 938cc8e79f..60708ae18f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionFactoryTest.java @@ -28,7 +28,7 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SimpleSendMultipleQueuesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SimpleSendMultipleQueuesTest.java index 9795ecc01f..235eef0410 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SimpleSendMultipleQueuesTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SimpleSendMultipleQueuesTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java index cecfe50e1a..79eac1c9dd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java @@ -39,8 +39,8 @@ import org.apache.activemq.artemis.api.core.management.ManagementHelper; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java index ea2df2b134..2c47632c62 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java @@ -45,8 +45,8 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.SingleServerTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import java.util.Arrays; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java index f75539a4a8..8b45ef18bc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.tests.util.SingleServerTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; public class TransientQueueTest extends SingleServerTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientExitTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientExitTest.java index d890d50494..70c5b22862 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientExitTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientExitTest.java @@ -23,8 +23,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.SpawnedVMSupport; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java index 8ba08a607d..afd769788d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java @@ -70,8 +70,8 @@ import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.LinkedListIterator; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.ReusableLatch; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java index 9e53c01739..857176fad2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java @@ -57,8 +57,8 @@ import org.apache.activemq.artemis.core.server.impl.InVMNodeManager; import org.apache.activemq.artemis.core.transaction.impl.XidImpl; import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage; import org.apache.activemq.artemis.tests.util.CountDownSessionFailureListener; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java index 5b04a1418a..a2b3ea9b82 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java @@ -31,7 +31,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQBytesMessage; import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java index 07b75d4185..3662fb8a4a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/topology/TopologyClusterTestBase.java @@ -34,7 +34,7 @@ import org.apache.activemq.artemis.core.server.cluster.ClusterManager; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java index 9ac3c6e2f9..4a8e23dcc0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java @@ -28,8 +28,8 @@ import org.apache.activemq.artemis.api.core.BroadcastEndpointFactory; import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory; import org.apache.activemq.artemis.core.cluster.DiscoveryGroup; import org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.ActiveMQThreadFactory; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java index d6f3da4447..0c667a8e9d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryTest.java @@ -38,7 +38,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQComponent; import org.apache.activemq.artemis.core.server.cluster.BroadcastGroup; import org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl; import org.apache.activemq.artemis.core.server.management.Notification; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.UUIDGenerator; import org.junit.After; import org.junit.Assert; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java index c1b89e4324..e26fe93c8d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/divert/DivertTest.java @@ -16,6 +16,7 @@ */ package org.apache.activemq.artemis.tests.integration.divert; +import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.client.ClientConsumer; import org.apache.activemq.artemis.api.core.client.ClientMessage; @@ -25,7 +26,6 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.config.DivertConfiguration; -import org.apache.activemq.artemis.core.message.impl.MessageImpl; import org.apache.activemq.artemis.core.postoffice.Binding; import org.apache.activemq.artemis.core.postoffice.impl.DivertBinding; import org.apache.activemq.artemis.core.server.ActiveMQServer; @@ -213,10 +213,10 @@ public class DivertTest extends ActiveMQTestBase { System.out.println("Received message " + message); assertNotNull(message); - if (message.getStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE).equals("queue1")) { + if (message.getStringProperty(Message.HDR_ORIGINAL_QUEUE).equals("queue1")) { countOriginal1++; } - else if (message.getStringProperty(MessageImpl.HDR_ORIGINAL_QUEUE).equals("queue2")) { + else if (message.getStringProperty(Message.HDR_ORIGINAL_QUEUE).equals("queue2")) { countOriginal2++; } else { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java index 93f03bfd9c..4df9c8903a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.jms; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration; import org.junit.Before; @@ -45,7 +46,6 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.tests.util.RandomUtil; /** * ActiveMQConnectionFactoryTest diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NoLocalSubscriberTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NoLocalSubscriberTest.java index 1bca7eaf60..6cd63e33bd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NoLocalSubscriberTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NoLocalSubscriberTest.java @@ -30,7 +30,7 @@ import javax.jms.Topic; import javax.jms.TopicSubscriber; import org.apache.activemq.artemis.tests.util.JMSTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; public class NoLocalSubscriberTest extends JMSTestBase { // Constants ----------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TextMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TextMessageTest.java index 6c6acac292..faa38955fe 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TextMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TextMessageTest.java @@ -20,7 +20,7 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.jms.JMSFactoryType; import org.apache.activemq.artemis.tests.util.JMSTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java index dd64621c8f..ed5dcae095 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java @@ -42,7 +42,7 @@ import org.apache.activemq.artemis.tests.integration.jms.server.management.JMSUt import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.tests.util.InVMNodeManagerServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java index e6f98080f4..a878ae779b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java @@ -47,7 +47,7 @@ import org.apache.activemq.artemis.tests.integration.jms.server.management.JMSUt import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.tests.util.InVMNodeManagerServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java index 26dea90847..cba768ac49 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java @@ -31,7 +31,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQDestination; import org.apache.activemq.artemis.jms.client.ActiveMQSession; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java index 2098ee6cac..382e951829 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ConnectionFactorySerializationTest.java @@ -39,11 +39,11 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration; import org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory; import org.apache.activemq.artemis.api.jms.JMSFactoryType; import org.apache.activemq.artemis.tests.util.JMSTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfigurationImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.commons.beanutils.BeanUtilsBean; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java index 03e64e6c4f..d9912b60ee 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.artemis.jms.server.config.impl.TopicConfigurationImpl import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java index 6cad5d4af5..fbac0884de 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlTest.java @@ -59,7 +59,7 @@ import org.apache.activemq.artemis.jms.server.management.JMSNotificationType; import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper; import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.UUIDGenerator; import org.apache.activemq.artemis.utils.json.JSONArray; import org.junit.Assert; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java index 194bce9a45..30db0a2df5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java @@ -41,7 +41,7 @@ import org.apache.activemq.artemis.tests.integration.management.ManagementTestBa import org.apache.activemq.artemis.tests.unit.ra.BootstrapContext; import org.apache.activemq.artemis.tests.unit.ra.MessageEndpointFactory; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java index f0c345107d..33466239a5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlRestartTest.java @@ -34,7 +34,7 @@ import org.apache.activemq.artemis.tests.integration.management.ManagementContro import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java index 659d7857d8..a1c770f14a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java @@ -47,7 +47,7 @@ import org.apache.activemq.artemis.tests.integration.management.ManagementContro import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java index 79c0e83a87..6b15b23872 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java @@ -37,6 +37,7 @@ import java.util.Set; import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.tests.integration.cluster.failover.FailoverTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.apache.activemq.artemis.api.core.TransportConfiguration; import org.apache.activemq.artemis.api.core.client.ClientSession; @@ -54,7 +55,6 @@ import org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImp import org.apache.activemq.artemis.jms.client.ActiveMQConnection; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class JMSUtil { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlTest.java index 825c866f37..a23f06779a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlTest.java @@ -36,7 +36,7 @@ import org.apache.activemq.artemis.jms.server.management.JMSNotificationType; import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper; import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlUsingJMSTest.java index 0ec7ac2d4d..8e310eec18 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlUsingJMSTest.java @@ -32,7 +32,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQTopic; import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.artemis.tests.integration.management.ManagementTestBase; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java index 691d513cf7..a6b4a8251a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.management; import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.tests.integration.SimpleNotificationService; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import java.util.HashMap; @@ -34,7 +35,6 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.management.Notification; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class AcceptorControlTest extends ManagementTestBase { // Static -------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java index a3c65f489b..9c4bd2e766 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java @@ -45,7 +45,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy; import org.apache.activemq.artemis.core.transaction.impl.XidImpl; import org.apache.activemq.artemis.jlibaio.LibaioContext; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.UUIDGenerator; import org.apache.activemq.artemis.utils.json.JSONArray; import org.apache.activemq.artemis.utils.json.JSONObject; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java index 284d61df86..cbcba36e93 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlTest.java @@ -31,7 +31,7 @@ import org.apache.activemq.artemis.core.security.Role; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.impl.QueueImpl; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlUsingCoreTest.java index 57181bf41d..53ee96a094 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AddressControlUsingCoreTest.java @@ -26,7 +26,7 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.security.CheckType; import org.apache.activemq.artemis.core.security.Role; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlTest.java index d1eb9eaee5..4f899cc7d0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlTest.java @@ -17,6 +17,7 @@ package org.apache.activemq.artemis.tests.integration.management; import org.apache.activemq.artemis.tests.integration.SimpleNotificationService; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; @@ -43,7 +44,6 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.management.Notification; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class BridgeControlTest extends ManagementTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlUsingCoreTest.java index e917e0ad49..776968e9c5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BridgeControlUsingCoreTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory; import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlTest.java index e6759eb749..9b4d44ad29 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.artemis.api.core.management.BroadcastGroupControl; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControl2Test.java index 12fc1ab0f0..6918eb8afe 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControl2Test.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.management; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.After; @@ -44,7 +45,6 @@ import org.apache.activemq.artemis.core.config.CoreQueueConfiguration; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class ClusterConnectionControl2Test extends ManagementTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlTest.java index d32b054804..65cfd11a42 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlTest.java @@ -47,7 +47,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.management.Notification; import org.apache.activemq.artemis.tests.integration.SimpleNotificationService; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; public class ClusterConnectionControlTest extends ManagementTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlTest.java index fd8820505f..73117272c4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.artemis.core.config.CoreQueueConfiguration; import org.apache.activemq.artemis.core.config.DivertConfiguration; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java index d6bd6a43cc..bf72cc663c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementHelperTest.java @@ -23,8 +23,8 @@ import java.util.Map; import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.management.ManagementHelper; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementServiceImplTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementServiceImplTest.java index cc33b44465..2d963aca5b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementServiceImplTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementServiceImplTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.management; import org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import org.junit.Assert; @@ -36,7 +37,6 @@ import org.apache.activemq.artemis.core.server.ServerMessage; import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl; import org.apache.activemq.artemis.core.server.management.impl.ManagementServiceImpl; import org.apache.activemq.artemis.tests.integration.server.FakeStorageManager; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class ManagementServiceImplTest extends ActiveMQTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java index 26db0d617a..6bd8a53680 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java index 96b6dc398c..d8b099528c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/NotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/NotificationTest.java index a5a66955d8..2e99da2746 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/NotificationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/NotificationTest.java @@ -29,7 +29,7 @@ import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java index 275495fe67..52c5edb2b4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java @@ -39,14 +39,13 @@ import org.apache.activemq.artemis.api.core.management.MessageCounterInfo; import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder; import org.apache.activemq.artemis.api.core.management.QueueControl; import org.apache.activemq.artemis.core.config.Configuration; -import org.apache.activemq.artemis.core.message.impl.MessageImpl; import org.apache.activemq.artemis.core.messagecounter.impl.MessageCounterManagerImpl; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.integration.jms.server.management.JMSUtil; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.json.JSONArray; import org.apache.activemq.artemis.utils.json.JSONObject; import org.junit.Assert; @@ -1257,10 +1256,10 @@ public class QueueControlTest extends ManagementTestBase { // send 2 messages on queue, both scheduled long timeout = System.currentTimeMillis() + 5000; ClientMessage m1 = session.createMessage(true); - m1.putLongProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME, timeout); + m1.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, timeout); producer.send(m1); ClientMessage m2 = session.createMessage(true); - m2.putLongProperty(MessageImpl.HDR_SCHEDULED_DELIVERY_TIME, timeout); + m2.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, timeout); producer.send(m2); QueueControl queueControl = createManagementControl(address, queue); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java index b3e20c9787..8cf33f843b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java @@ -35,7 +35,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java index ae68d0dc3a..ae04a9f55b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PageCountSyncOnNonTXTest.java @@ -25,8 +25,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.Queue; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; @@ -134,7 +134,7 @@ public class PageCountSyncOnNonTXTest extends ActiveMQTestBase { } assertEquals("Process didn't end as expected", 1, process.waitFor()); - ActiveMQServer server = PageCountSyncServer.createServer(getTestDir()); + ActiveMQServer server = SpawnedServerSupport.createServer(getTestDir()); try { server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java index 1bc5ef63dc..de8dced37d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java @@ -246,7 +246,7 @@ public class PagingWithFailoverAndCountersTest extends ActiveMQTestBase { // The best to way to validate if the server is ready and operating is to send and consume at least one message // before we could do valid monitoring try { - ServerLocator locator = PagingWithFailoverServer.createLocator(PORT2).setInitialConnectAttempts(100).setRetryInterval(100); + ServerLocator locator = SpawnedServerSupport.createLocator(PORT2).setInitialConnectAttempts(100).setRetryInterval(100); ClientSessionFactory factory = locator.createSessionFactory(); ClientSession session = factory.createSession(); @@ -290,7 +290,7 @@ public class PagingWithFailoverAndCountersTest extends ActiveMQTestBase { public void testValidateDeliveryAndCounters() throws Exception { startLive(); - ServerLocator locator = PagingWithFailoverServer.createLocator(PORT1).setInitialConnectAttempts(100).setReconnectAttempts(-1).setRetryInterval(100); + ServerLocator locator = SpawnedServerSupport.createLocator(PORT1).setInitialConnectAttempts(100).setReconnectAttempts(-1).setRetryInterval(100); ClientSessionFactory factory = locator.createSessionFactory(); @@ -361,7 +361,7 @@ public class PagingWithFailoverAndCountersTest extends ActiveMQTestBase { assertTrue(messageCount >= 0); - locator = PagingWithFailoverServer.createLocator(PORT1).setInitialConnectAttempts(100).setReconnectAttempts(-1).setRetryInterval(100); + locator = SpawnedServerSupport.createLocator(PORT1).setInitialConnectAttempts(100).setReconnectAttempts(-1).setRetryInterval(100); factory = locator.createSessionFactory(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java index 208c553aaf..53faf540bd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/DuplicateCacheTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContex import org.apache.activemq.artemis.core.postoffice.DuplicateIDCache; import org.apache.activemq.artemis.core.postoffice.impl.DuplicateIDCacheImpl; import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.After; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java index 8989b278fc..88f67d3365 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JMSConnectionFactoryConfigurationStorageTest.java @@ -23,7 +23,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.jms.persistence.config.PersistedConnectionFactory; import org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration; import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfigurationImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java index ec4b666aa6..4854574cbf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java @@ -29,7 +29,7 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration; import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.jms.server.config.impl.TransportConfigurationEncodingSupport; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.api.core.Pair; import org.junit.Assert; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationOrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationOrderTest.java index 9c7badefc2..3a67708993 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationOrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationOrderTest.java @@ -29,8 +29,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.tests.integration.cluster.failover.FailoverTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils; +import org.apache.activemq.artemis.utils.RandomUtil; public class ReplicationOrderTest extends FailoverTestBase { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SimpleClient.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SimpleClient.java index fa33968be2..e04a58d1b7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SimpleClient.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SimpleClient.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; /** * Code to be run in an external VM, via main() diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverOneWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverOneWaySSLTest.java index 08293f0b05..f23e58006d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverOneWaySSLTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverOneWaySSLTest.java @@ -38,11 +38,11 @@ import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java index f24f34859d..1ced54f484 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java @@ -36,8 +36,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.api.core.client.ServerLocator; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.protocol.core.Packet; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java index 534f3422f1..ac9934ef15 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java @@ -34,8 +34,8 @@ import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.management.ResourceNames; import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.protocol.stomp.Stomp; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java index 4d9eedcb15..6bd2fcf425 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java @@ -44,9 +44,9 @@ import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory; import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl; import org.apache.activemq.artemis.jlibaio.LibaioContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.ActiveMQThreadFactory; import org.apache.activemq.artemis.utils.OrderedExecutorFactory; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.SimpleIDGenerator; import org.junit.After; import org.junit.Before; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalRestartStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalRestartStressTest.java index 1454a3a868..6373a2fd37 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalRestartStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalRestartStressTest.java @@ -26,8 +26,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; /** diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java index febcb453e1..5fbc733195 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java @@ -39,8 +39,8 @@ import org.apache.activemq.artemis.core.transaction.Transaction; import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl; import org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.LinkedListIterator; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java index dbae369213..9f717bd8b7 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java @@ -27,7 +27,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.unit.UnitTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.Test; diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java index 4054c64137..9b5116e0d5 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java @@ -36,7 +36,7 @@ import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl; import org.apache.activemq.artemis.tests.unit.UnitTestLogger; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java index 549e61d412..32937a3184 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java @@ -31,9 +31,9 @@ import org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl; import org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQConsumerContext; import org.apache.activemq.artemis.spi.core.remoting.ConsumerContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.ActiveMQBufferInputStream; import org.apache.activemq.artemis.utils.FutureLatch; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java index e7140405e7..e64947c7c5 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java @@ -23,12 +23,12 @@ import java.io.File; import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.ActiveMQIOErrorException; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.journal.EncodingSupport; import org.apache.activemq.artemis.core.journal.RecordInfo; import org.apache.activemq.artemis.core.io.SequentialFile; import org.apache.activemq.artemis.core.journal.impl.JournalImpl; import org.apache.activemq.artemis.tests.unit.UnitTestLogger; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.junit.After; import org.junit.Assert; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java index 0178f63570..2a377ff589 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java @@ -24,10 +24,10 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl; import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.junit.Assert; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java index 868bdfa54b..10b9a064ed 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingManagerImplTest.java @@ -37,8 +37,8 @@ import org.apache.activemq.artemis.core.settings.HierarchicalRepository; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java index d361ffa520..59d26462b8 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PagingStoreImplTest.java @@ -55,9 +55,9 @@ import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory; import org.apache.activemq.artemis.tests.unit.util.FakePagingManager; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.utils.ExecutorFactory; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java index e89510e64e..30e302ecf5 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java @@ -37,9 +37,9 @@ import org.apache.activemq.artemis.core.postoffice.PostOffice; import org.apache.activemq.artemis.core.postoffice.impl.DuplicateIDCacheImpl; import org.apache.activemq.artemis.core.server.impl.PostOfficeJournalLoader; import org.apache.activemq.artemis.core.transaction.impl.ResourceManagerImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.ExecutorFactory; import org.apache.activemq.artemis.utils.OrderedExecutorFactory; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/ActiveMQBufferTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/ActiveMQBufferTestBase.java index d028085b56..cf51451b19 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/ActiveMQBufferTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/ActiveMQBufferTestBase.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.unit.core.remoting; import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Before; import org.junit.After; @@ -26,7 +27,6 @@ import org.junit.Test; import org.junit.Assert; import org.apache.activemq.artemis.api.core.SimpleString; -import org.apache.activemq.artemis.tests.util.RandomUtil; public abstract class ActiveMQBufferTestBase extends ActiveMQTestBase { // Constants ----------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java index fae2d051b9..577736a497 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/cluster/impl/RemoteQueueBindImplTest.java @@ -18,12 +18,12 @@ package org.apache.activemq.artemis.tests.unit.core.server.cluster.impl; import org.apache.activemq.artemis.tests.unit.core.postoffice.impl.FakeQueue; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.cluster.impl.RemoteQueueBindingImpl; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class RemoteQueueBindImplTest extends ActiveMQTestBase { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/ActiveMQDestinationTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/ActiveMQDestinationTest.java index 5bc48a919c..a8cd905f37 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/ActiveMQDestinationTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/ActiveMQDestinationTest.java @@ -17,6 +17,7 @@ package org.apache.activemq.artemis.tests.unit.jms; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import javax.jms.JMSRuntimeException; @@ -26,7 +27,6 @@ import javax.jms.Topic; import org.junit.Assert; import org.apache.activemq.artemis.jms.client.ActiveMQDestination; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class ActiveMQDestinationTest extends ActiveMQTestBase { // Constants ----------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQMapMessageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQMapMessageTest.java index 962449cebc..972273eb9d 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQMapMessageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQMapMessageTest.java @@ -18,8 +18,8 @@ package org.apache.activemq.artemis.tests.unit.jms.client; import javax.jms.MessageFormatException; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.jms.client.ActiveMQMapMessage; import org.junit.Assert; import org.junit.Before; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java index 614084ee4e..8bd80c9110 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java @@ -17,6 +17,7 @@ package org.apache.activemq.artemis.tests.unit.jms.client; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import java.util.ArrayList; @@ -27,7 +28,6 @@ import javax.jms.MessageFormatException; import org.junit.Assert; import org.apache.activemq.artemis.jms.client.ActiveMQStreamMessage; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class ActiveMQStreamMessageTest extends ActiveMQTestBase { // Constants ----------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java index a7e68e83c1..a223c8e9fd 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/referenceable/DestinationObjectFactoryTest.java @@ -17,6 +17,7 @@ package org.apache.activemq.artemis.tests.unit.jms.referenceable; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Test; import javax.naming.Reference; @@ -26,7 +27,6 @@ import org.junit.Assert; import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient; import org.apache.activemq.artemis.jms.client.ActiveMQDestination; import org.apache.activemq.artemis.jms.referenceable.DestinationObjectFactory; -import org.apache.activemq.artemis.tests.util.RandomUtil; public class DestinationObjectFactoryTest extends ActiveMQTestBase { // Constants ----------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/UTF8Test.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/UTF8Test.java index ae143d47da..26c5e9d3a4 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/UTF8Test.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/UTF8Test.java @@ -31,9 +31,9 @@ import java.nio.ByteBuffer; import org.junit.Assert; -import org.apache.activemq.artemis.tests.util.RandomUtil; import org.apache.activemq.artemis.utils.DataConstants; import org.apache.activemq.artemis.utils.Random; +import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.artemis.utils.UTF8Util; public class UTF8Test extends ActiveMQTestBase {