You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2022/07/26 12:28:11 UTC
[activemq-artemis] branch new-logging updated: make start on updating integration tests
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/new-logging by this push:
new 6c5facc287 make start on updating integration tests
6c5facc287 is described below
commit 6c5facc287589f849e8fb252e457a5a1249c20fe
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Jul 26 13:27:46 2022 +0100
make start on updating integration tests
---
.../tests/integration/DuplicateDetectionTest.java | 5 +-
.../paging/TestDeadlockOnPurgePagingTest.java | 3 -
.../persistence/XmlImportExportTest.java | 73 ++++++++++++++++------
.../plugin/ResourceBrokerPluginTest.java | 9 +--
.../tests/integration/remoting/PingTest.java | 6 --
.../SharedNothingReplicationFlowControlTest.java | 13 ++--
.../replication/SharedNothingReplicationTest.java | 27 ++++----
.../scheduling/MultipliedDelayedMessageTest.java | 9 +--
.../integration/server/AIOFileLockTimeoutTest.java | 7 ++-
.../server/AddressQueueDeleteDelayTest.java | 9 +--
.../integration/server/NIOFileLockTimeoutTest.java | 7 ++-
.../server/PotentialOOMELoggingTest.java | 7 ++-
.../integration/server/ScaleDown3NodeTest.java | 21 ++++---
.../artemis/tests/integration/stomp/StompTest.java | 29 ++++-----
.../tests/integration/stomp/StompTestBase.java | 7 ++-
.../stomp/util/StompClientConnectionV10.java | 7 ++-
.../tests/integration/stomp/v12/StompV12Test.java | 2 +-
.../tests/integration/xa/BasicXaRecoveryTest.java | 5 +-
.../artemis/tests/integration/xa/BasicXaTest.java | 5 +-
19 files changed, 146 insertions(+), 105 deletions(-)
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/DuplicateDetectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/DuplicateDetectionTest.java
index 045fde9ecf..b2f2509020 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/DuplicateDetectionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/DuplicateDetectionTest.java
@@ -43,13 +43,14 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.UUIDGenerator;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
public class DuplicateDetectionTest extends ActiveMQTestBase {
@@ -66,7 +67,7 @@ public class DuplicateDetectionTest extends ActiveMQTestBase {
- private final Logger log = Logger.getLogger(this.getClass());
+ private final Logger log = LoggerFactory.getLogger(this.getClass());
private ActiveMQServer server;
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/TestDeadlockOnPurgePagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/TestDeadlockOnPurgePagingTest.java
index 2249634aec..8ae178b508 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/TestDeadlockOnPurgePagingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/TestDeadlockOnPurgePagingTest.java
@@ -34,15 +34,12 @@ import org.apache.activemq.artemis.core.server.impl.QueueImpl;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.tests.util.Wait;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class TestDeadlockOnPurgePagingTest extends ActiveMQTestBase {
- private static final Logger logger = Logger.getLogger(TestDeadlockOnPurgePagingTest.class);
-
protected ServerLocator locator;
protected ActiveMQServer server;
protected ClientSessionFactory sf;
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
index 72f1576600..02d74690fc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/XmlImportExportTest.java
@@ -59,10 +59,11 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.tests.util.RandomUtil;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.utils.UUIDGenerator;
-import org.jboss.logging.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A test of the XML export/import functionality
@@ -70,7 +71,7 @@ import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class XmlImportExportTest extends ActiveMQTestBase {
- private static final Logger logger = Logger.getLogger(XmlImportExportTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(XmlImportExportTest.class);
private boolean forceLongs;
@@ -144,7 +145,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -241,7 +244,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -297,7 +302,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -342,7 +349,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -389,7 +398,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -427,7 +438,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -492,7 +505,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -565,7 +580,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -636,7 +653,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -689,7 +708,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -755,7 +776,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -822,7 +845,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -960,7 +985,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -1006,7 +1033,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -1062,7 +1091,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -1110,7 +1141,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
@@ -1173,7 +1206,9 @@ public class XmlImportExportTest extends ActiveMQTestBase {
ByteArrayOutputStream xmlOutputStream = new ByteArrayOutputStream();
XmlDataExporter xmlDataExporter = new XmlDataExporter();
xmlDataExporter.process(xmlOutputStream, server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getJournalDirectory(), server.getConfiguration().getPagingDirectory(), server.getConfiguration().getLargeMessagesDirectory());
- if (logger.isDebugEnabled()) logger.debug(new String(xmlOutputStream.toByteArray()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(new String(xmlOutputStream.toByteArray()));
+ }
clearDataRecreateServerDirs();
server.start();
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java
index 259c090a58..47f65dae29 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java
@@ -40,13 +40,14 @@ import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.UUIDGenerator;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ResourceBrokerPluginTest extends ActiveMQTestBase {
- private static final Logger logger = Logger.getLogger(ResourceBrokerPluginTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(ResourceBrokerPluginTest.class);
private final Map<String, AddressSettings> addressSettings = new HashMap<>();
@@ -145,8 +146,8 @@ public class ResourceBrokerPluginTest extends ActiveMQTestBase {
if (clientAddress != null && !clientAddress.equals(remotingConnection.getRemoteAddress())) {
latch.countDown();
- logger.warn("Possible XA client misconfiguration. Two addresses with the same node name " +
- nodeName + ": " + clientAddress + "/" + remotingConnection.getRemoteAddress());
+ logger.warn("Possible XA client misconfiguration. Two addresses with the same node name {}: {}/{}",
+ nodeName, clientAddress, remotingConnection.getRemoteAddress());
}
}
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java
index 8de5748462..14457ad088 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java
@@ -38,22 +38,16 @@ import org.apache.activemq.artemis.core.remoting.CloseListener;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class PingTest extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(PingTest.class);
-
private static final long CLIENT_FAILURE_CHECK_PERIOD = 500;
-
private ActiveMQServer server;
-
-
@Override
@Before
public void setUp() throws Exception {
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java
index 1d923731d6..dda89c64af 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java
@@ -79,13 +79,14 @@ import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager
import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.ExecutorFactory;
-import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SharedNothingReplicationFlowControlTest extends ActiveMQTestBase {
@@ -101,7 +102,7 @@ public class SharedNothingReplicationFlowControlTest extends ActiveMQTestBase {
sendMessageExecutor.shutdownNow();
}
- private static final Logger logger = Logger.getLogger(SharedNothingReplicationFlowControlTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(SharedNothingReplicationFlowControlTest.class);
@Rule
public TemporaryFolder brokersFolder = new TemporaryFolder();
@@ -149,7 +150,7 @@ public class SharedNothingReplicationFlowControlTest extends ActiveMQTestBase {
ClientProducer producer = session.createProducer("flowcontrol");
ClientMessage message = session.createMessage(true);
message.writeBodyBufferBytes(body);
- logger.infof("try to send a message after replicated");
+ logger.info("try to send a message after replicated");
producer.send(message);
logger.info("send message done");
producer.close();
@@ -186,7 +187,7 @@ public class SharedNothingReplicationFlowControlTest extends ActiveMQTestBase {
if (!(info.userRecordType == JournalRecordIds.ADD_MESSAGE_PROTOCOL)) {
// ignore
}
- logger.infof("got live message %d %d", info.id, info.userRecordType);
+ logger.info("got live message {} {}", info.id, info.userRecordType);
liveJournalCounter.incrementAndGet();
}
});
@@ -206,12 +207,12 @@ public class SharedNothingReplicationFlowControlTest extends ActiveMQTestBase {
if (!(info.userRecordType == JournalRecordIds.ADD_MESSAGE_PROTOCOL)) {
// ignore
}
- logger.infof("replicated message %d", info.id);
+ logger.info("replicated message {}", info.id);
replicationCounter.incrementAndGet();
}
});
- logger.infof("expected %d messages, live=%d, backup=%d", j, liveJournalCounter.get(), replicationCounter.get());
+ logger.info("expected {} messages, live={}, backup={}", j, liveJournalCounter.get(), replicationCounter.get());
Assert.assertEquals("Live lost journal record", j, liveJournalCounter.get());
Assert.assertEquals("Backup did not replicated all journal", j, replicationCounter.get());
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java
index fde20f4a87..9153fc8752 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java
@@ -50,13 +50,14 @@ import org.apache.activemq.artemis.core.server.ActiveMQServers;
import org.apache.activemq.artemis.core.server.JournalType;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
@@ -69,7 +70,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class SharedNothingReplicationTest extends ActiveMQTestBase {
- private static final Logger logger = Logger.getLogger(SharedNothingReplicationTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(SharedNothingReplicationTest.class);
@Rule
public TemporaryFolder brokersFolder = new TemporaryFolder();
@@ -110,7 +111,7 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
locator.addClusterTopologyListener(new ClusterTopologyListener() {
@Override
public void nodeUP(TopologyMember member, boolean last) {
- logger.debugf("nodeUP fired last=%s, live=%s, backup=%s", last, member.getLive(), member.getBackup());
+ logger.debug("nodeUP fired last={}, live={}, backup={}", last, member.getLive(), member.getBackup());
if (member.getBackup() != null) {
replicated.countDown();
}
@@ -139,9 +140,9 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
ClientMessage message = session.createMessage(true);
// this will make journal's append executor busy
message.putLongProperty("delay", 500L);
- logger.debugf("try to send a message before replicated");
+ logger.debug("try to send a message before replicated");
producer.send(message);
- logger.debugf("send message done");
+ logger.debug("send message done");
producer.close();
session.close();
@@ -169,9 +170,9 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
ClientProducer producer = session.createProducer("slow");
ClientMessage message = session.createMessage(true);
message.putLongProperty("delay", 0L);
- logger.debugf("try to send a message after replicated");
+ logger.debug("try to send a message after replicated");
producer.send(message);
- logger.debugf("send message done");
+ logger.debug("send message done");
producer.close();
session.close();
@@ -205,7 +206,7 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
if (!(info.userRecordType == JournalRecordIds.ADD_MESSAGE_PROTOCOL)) {
// ignore
}
- logger.debugf("got live message %d", info.id);
+ logger.debug("got live message {}", info.id);
liveJournalCounter.incrementAndGet();
}
});
@@ -225,12 +226,12 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
if (!(info.userRecordType == JournalRecordIds.ADD_MESSAGE_PROTOCOL)) {
// ignore
}
- logger.debugf("replicated message %d", info.id);
+ logger.debug("replicated message {}", info.id);
replicationCounter.incrementAndGet();
}
});
- logger.debugf("expected %d messages, live=%d, backup=%d", j, liveJournalCounter.get(), replicationCounter.get());
+ logger.debug("expected {} messages, live={}, backup={}", j, liveJournalCounter.get(), replicationCounter.get());
Assert.assertEquals("Live lost journal record", j, liveJournalCounter.get());
Assert.assertEquals("Backup did not replicated all journal", j, replicationCounter.get());
@@ -306,7 +307,7 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
boolean used = false;
- private static final Logger logger = Logger.getLogger(SlowMessagePersister.class);
+ private static final Logger logger = LoggerFactory.getLogger(SlowMessagePersister.class);
static SlowMessagePersister theInstance;
@@ -339,9 +340,9 @@ public class SharedNothingReplicationTest extends ActiveMQTestBase {
try {
Long delay = record.getLongProperty("delay");
if (delay == null || delay.longValue() <= 0) {
- logger.debugf("encode message %d, caller=%s", record.getMessageID(), Thread.currentThread().getName());
+ logger.debug("encode message {}, caller={}", record.getMessageID(), Thread.currentThread().getName());
} else {
- logger.debugf("sleep %d ms before encode message %d, caller=%s", delay.longValue(), record.getMessageID(), Thread.currentThread().getName());
+ logger.debug("sleep {} ms before encode message {}, caller={}", delay.longValue(), record.getMessageID(), Thread.currentThread().getName());
Thread.sleep(delay.longValue());
}
} catch (InterruptedException e) {
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/MultipliedDelayedMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/MultipliedDelayedMessageTest.java
index 7ddfeabac6..fec21f8665 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/MultipliedDelayedMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/MultipliedDelayedMessageTest.java
@@ -27,14 +27,15 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MultipliedDelayedMessageTest extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(MultipliedDelayedMessageTest.class);
+ private static final Logger log = LoggerFactory.getLogger(MultipliedDelayedMessageTest.class);
private ActiveMQServer server;
@@ -101,11 +102,11 @@ public class MultipliedDelayedMessageTest extends ActiveMQTestBase {
session.rollback();
long expectedDelay = calculateExpectedDelay(DELAY, MAX_DELAY, MULTIPLIER, i);
- log.debug("\nExpected delay: " + expectedDelay);
+ log.debug("\nExpected delay: {}", expectedDelay);
tm = consumer.receive(expectedDelay + 500);
long stop = System.currentTimeMillis();
Assert.assertNotNull(tm);
- log.debug("Actual delay: " + (stop - start));
+ log.debug("Actual delay: {}", (stop - start));
Assert.assertTrue(stop - start >= expectedDelay);
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AIOFileLockTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AIOFileLockTimeoutTest.java
index 9d41688bfc..1683326b4e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AIOFileLockTimeoutTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AIOFileLockTimeoutTest.java
@@ -20,12 +20,13 @@ import org.junit.Test;
public class AIOFileLockTimeoutTest extends FileLockTimeoutTest {
- @Test
/**
* When running this test from an IDE add this to the test command line so that the AssertionLoggerHandler works properly:
*
- * -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:<path_to_source>/tests/config/logging.properties
- */ public void testAIOFileLockExpiration() throws Exception {
+ * -Dlog4j2.configurationFile=file:<path_to_source>/tests/config/log4j2-tests-config.properties
+ */
+ @Test
+ public void testAIOFileLockExpiration() throws Exception {
doTest(true);
}
}
\ No newline at end of file
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java
index de2e2d18e8..07fc6b8d41 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java
@@ -31,14 +31,15 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.RandomUtil;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class AddressQueueDeleteDelayTest extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(AddressQueueDeleteDelayTest.class);
+ private static final Logger log = LoggerFactory.getLogger(AddressQueueDeleteDelayTest.class);
public static final int DURATION_MILLIS = 30_000;
public static final int NEGATIVE_DURATION_MILLIS = 1_000;
@@ -85,14 +86,14 @@ public class AddressQueueDeleteDelayTest extends ActiveMQTestBase {
long elapsedTime = System.currentTimeMillis() - start;
- log.debug("Elapsed time to delete queue: " + elapsedTime);
+ log.debug("Elapsed time to delete queue: {}", elapsedTime);
assertTrue(elapsedTime >= (deleteQueuesDelay));
start = info.getBindingRemovedTimestamp();
assertTrue(Wait.waitFor(() -> server.getAddressInfo(address) == null, DURATION_MILLIS, SLEEP_MILLIS));
elapsedTime = System.currentTimeMillis() - start;
- log.debug("Elapsed time to delete address: " + elapsedTime);
+ log.debug("Elapsed time to delete address: {}", elapsedTime);
assertTrue("ellapsedTime=" + elapsedTime + " while delay is " + deleteAddressesDelay, elapsedTime >= (deleteAddressesDelay));
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/NIOFileLockTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/NIOFileLockTimeoutTest.java
index 9e44c060f8..5aad82186e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/NIOFileLockTimeoutTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/NIOFileLockTimeoutTest.java
@@ -20,12 +20,13 @@ import org.junit.Test;
public class NIOFileLockTimeoutTest extends FileLockTimeoutTest {
- @Test
/**
* When running this test from an IDE add this to the test command line so that the AssertionLoggerHandler works properly:
*
- * -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:<path_to_source>/tests/config/logging.properties
- */ public void testNIOFileLockExpiration() throws Exception {
+ * -Dlog4j2.configurationFile=file:<path_to_source>/tests/config/log4j2-tests-config.properties
+ */
+ @Test
+ public void testNIOFileLockExpiration() throws Exception {
doTest(false);
}
}
\ No newline at end of file
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java
index b5af7b320a..20b49f7b77 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/PotentialOOMELoggingTest.java
@@ -35,12 +35,13 @@ public class PotentialOOMELoggingTest extends ActiveMQTestBase {
AssertionLoggerHandler.startCapture();
}
- @Test
/**
* When running this test from an IDE add this to the test command line so that the AssertionLoggerHandler works properly:
*
- * -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:<path_to_source>/tests/config/logging.properties
- */ public void testBlockLogging() throws Exception {
+ * -Dlog4j2.configurationFile=file:<path_to_source>/tests/config/log4j2-tests-config.properties
+ */
+ @Test
+ public void testBlockLogging() throws Exception {
ActiveMQServer server = createServer(false, createDefaultInVMConfig());
for (int i = 0; i < 10000; i++) {
server.getConfiguration().addQueueConfiguration(new QueueConfiguration(UUID.randomUUID().toString()));
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
index d7e3061f84..1634eb374a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDown3NodeTest.java
@@ -35,14 +35,15 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
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.Wait;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ScaleDown3NodeTest extends ClusterTestBase {
- private static final Logger log = Logger.getLogger(ScaleDown3NodeTest.class);
+ private static final Logger log = LoggerFactory.getLogger(ScaleDown3NodeTest.class);
@Override
@Before
@@ -75,9 +76,9 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
setupSessionFactory(1, isNetty(), false, servers[1].getConfiguration().getClusterUser(), servers[1].getConfiguration().getClusterPassword());
setupSessionFactory(2, isNetty(), false, servers[2].getConfiguration().getClusterUser(), servers[2].getConfiguration().getClusterPassword());
log.debug("===============================");
- log.debug("Node 0: " + servers[0].getClusterManager().getNodeId());
- log.debug("Node 1: " + servers[1].getClusterManager().getNodeId());
- log.debug("Node 2: " + servers[2].getClusterManager().getNodeId());
+ log.debug("Node 0: {}", servers[0].getClusterManager().getNodeId());
+ log.debug("Node 1: {}", servers[1].getClusterManager().getNodeId());
+ log.debug("Node 2: {}", servers[2].getClusterManager().getNodeId());
log.debug("===============================");
servers[0].setIdentity("Node0");
@@ -169,7 +170,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
Assert.assertEquals(TEST_SIZE, getMessageCount(snfQueue));
// trigger scaleDown from node 0 to node 1
- log.debug("============ Stopping " + servers[0].getNodeID());
+ log.debug("============ Stopping {}", servers[0].getNodeID());
removeConsumer(0);
servers[0].stop();
@@ -194,7 +195,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
Assert.assertEquals(ActiveMQTestBase.getSamplebyte(j), clientMessage.getBodyBuffer().readByte());
}
}
- log.debug("Received: " + clientMessage);
+ log.debug("Received: {}", clientMessage);
clientMessage.acknowledge();
}
@@ -261,7 +262,7 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
Wait.assertEquals(TEST_SIZE * 2, snfQueue::getMessageCount);
// trigger scaleDown from node 0 to node 1
- log.debug("============ Stopping " + servers[0].getNodeID());
+ log.debug("============ Stopping {}", servers[0].getNodeID());
removeConsumer(0);
removeConsumer(1);
servers[0].stop();
@@ -282,12 +283,12 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
for (int i = 0; i < TEST_SIZE; i++) {
ClientMessage clientMessage = consumers[0].getConsumer().receive(1000);
Assert.assertNotNull(clientMessage);
- log.debug("Received: " + clientMessage);
+ log.debug("Received: {}", clientMessage);
clientMessage.acknowledge();
clientMessage = consumers[1].getConsumer().receive(1000);
Assert.assertNotNull(clientMessage);
- log.debug("Received: " + clientMessage);
+ log.debug("Received: {}", clientMessage);
clientMessage.acknowledge();
}
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 0075990605..88b433ec17 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
@@ -69,20 +69,21 @@ import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConne
import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnectionFactory;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.utils.RandomUtil;
-import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static org.apache.activemq.artemis.utils.collections.IterableStream.iterableOf;
@RunWith(Parameterized.class)
public class StompTest extends StompTestBase {
- private static final Logger log = Logger.getLogger(StompTest.class);
+ private static final Logger log = LoggerFactory.getLogger(StompTest.class);
protected StompClientConnection conn;
@@ -837,7 +838,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage(text);
ClientStompFrame frame = conn.receiveFrame(10000);
- log.debug(frame);
+ log.debug("{}", frame);
Assert.assertEquals(Stomp.Responses.MESSAGE, frame.getCommand());
Assert.assertEquals(getQueuePrefix() + getQueueName(), frame.getHeader(Stomp.Headers.Message.DESTINATION));
Assert.assertEquals(text, frame.getBody());
@@ -1048,7 +1049,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage("second message");
frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
}
@@ -1071,7 +1072,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage("second message");
frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
}
@@ -1158,7 +1159,7 @@ public class StompTest extends StompTestBase {
if (length - baselineQueueCount == 1) {
return true;
} else {
- log.debug("Queue count: " + (length - baselineQueueCount));
+ log.debug("Queue count: {}", (length - baselineQueueCount));
return false;
}
});
@@ -1175,7 +1176,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage(getName(), topic);
frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
assertEquals("Subscription queue should be deleted", 0, server.getActiveMQServerControl().getQueueNames().length - baselineQueueCount);
@@ -1210,7 +1211,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage(getName(), queue);
frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
assertEquals("Subscription queue should not be deleted", baselineQueueCount, server.getActiveMQServerControl().getQueueNames().length);
@@ -1245,7 +1246,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage(getName(), ActiveMQJMSClient.createQueue(nonExistentQueue));
frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
conn.disconnect();
@@ -1409,7 +1410,7 @@ public class StompTest extends StompTestBase {
send(conn, getTopicPrefix() + getTopicName(), null, "Hello World");
ClientStompFrame frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
// send message on another JMS connection => it should be received
@@ -1444,7 +1445,7 @@ public class StompTest extends StompTestBase {
// ...and nothing else
ClientStompFrame frame = conn.receiveFrame(100);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull(frame);
conn.disconnect();
@@ -1513,7 +1514,7 @@ public class StompTest extends StompTestBase {
sendJmsMessage(getName(), topic);
ClientStompFrame frame = conn.receiveFrame(NEGATIVE_TIME_OUT);
- log.debug("Received frame: " + frame);
+ log.debug("Received frame: {}", frame);
Assert.assertNull("No message should have been received since subscription was removed", frame);
conn.disconnect();
@@ -1855,7 +1856,7 @@ public class StompTest extends StompTestBase {
frame = conn.receiveFrame(10000);
- log.debug("Received: " + frame);
+ log.debug("Received: {}", frame);
Assert.assertEquals(Boolean.TRUE.toString(), frame.getHeader(ManagementHelper.HDR_OPERATION_SUCCEEDED.toString()));
// the address will be returned in the message body in a JSON array
@@ -1878,7 +1879,7 @@ public class StompTest extends StompTestBase {
frame = conn.receiveFrame(10000);
- log.debug("Received: " + frame);
+ log.debug("Received: {}", frame);
Assert.assertEquals(Boolean.TRUE.toString(), frame.getHeader(ManagementHelper.HDR_OPERATION_SUCCEEDED.toString()));
// there is no such messages => 0 returned in a JSON array
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
index 60f552e773..e149b46a91 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestBase.java
@@ -55,17 +55,18 @@ import org.apache.activemq.artemis.tests.integration.stomp.util.ClientStompFrame
import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnection;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.RetryRule;
-import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
public abstract class StompTestBase extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(StompTestBase.class);
+ private static final Logger log = LoggerFactory.getLogger(StompTestBase.class);
@Parameterized.Parameter
public String scheme;
@@ -637,7 +638,7 @@ public abstract class StompTestBase extends ActiveMQTestBase {
assertEquals(uuid, frame.getHeader(Stomp.Headers.Response.RECEIPT_ID));
}
- log.debug("Received: " + frame);
+ log.debug("Received: {}", frame);
return frame;
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java
index 4c74155884..60f76f3b80 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java
@@ -20,11 +20,12 @@ import java.io.IOException;
import java.net.URI;
import org.apache.activemq.artemis.core.protocol.stomp.Stomp;
-import org.jboss.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class StompClientConnectionV10 extends AbstractStompClientConnection {
- private static final Logger log = Logger.getLogger(StompClientConnectionV10.class);
+ private static final Logger log = LoggerFactory.getLogger(StompClientConnectionV10.class);
public StompClientConnectionV10(String host, int port) throws IOException {
super("1.0", host, port);
@@ -62,7 +63,7 @@ public class StompClientConnectionV10 extends AbstractStompClientConnection {
if (response.getCommand().equals(Stomp.Responses.CONNECTED)) {
connected = true;
} else {
- log.warn("Connection failed with: " + response);
+ log.warn("Connection failed with: {}", response);
connected = false;
}
return response;
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
index 9bc25f7f4e..a0ab038e8c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
@@ -2494,7 +2494,7 @@ public class StompV12Test extends StompTestBase {
@Test
@Ignore("Needs updated to account for logging impl changes") //TODO: reinstate
public void testSubscribeWithNonZeroConsumerWindowSizeAndClientAck() throws Exception {
- //TODO: Note it is a;sp never reset: org.jboss.logmanager.Logger.getLogger(StompConnection.class.getName()).setLevel(org.jboss.logmanager.Level.DEBUG);
+ //TODO: Note it is also never reset: org.jboss.logmanager.Logger.getLogger(StompConnection.class.getName()).setLevel(org.jboss.logmanager.Level.DEBUG);
// the size of each message was determined from the DEBUG logging from org.apache.activemq.artemis.core.protocol.stomp.StompConnection
final int MESSAGE_SIZE = 270;
final int TIMEOUT = 1000;
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
index 9aec571d80..5bf9751690 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaRecoveryTest.java
@@ -44,18 +44,19 @@ import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage;
import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.UUIDGenerator;
-import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
public class BasicXaRecoveryTest extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(BasicXaRecoveryTest.class);
+ private static final Logger log = LoggerFactory.getLogger(BasicXaRecoveryTest.class);
private final Map<String, AddressSettings> addressSettings = new HashMap<>();
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java
index 81b064e5a6..230152442a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java
@@ -48,17 +48,18 @@ import org.apache.activemq.artemis.ra.ActiveMQRAXAResource;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
import org.apache.activemq.artemis.utils.UUIDGenerator;
import org.apache.activemq.artemis.utils.Wait;
-import org.jboss.logging.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class)
public class BasicXaTest extends ActiveMQTestBase {
- private static final Logger log = Logger.getLogger(BasicXaTest.class);
+ private static final Logger log = LoggerFactory.getLogger(BasicXaTest.class);
private final Map<String, AddressSettings> addressSettings = new HashMap<>();