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/06/27 16:54:12 UTC

[activemq-artemis] 01/04: get extra-tests module to compile [only]

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

commit 0edb2b681ce94a48197bf2f83ee294444c209415
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Mon Jun 27 17:14:06 2022 +0100

    get extra-tests module to compile [only]
---
 tests/extra-tests/pom.xml                          | 28 +++-----------------
 .../artemis/tests/extras/ExtrasTestLogger.java     | 30 ----------------------
 .../artemis/tests/extras/jms/xa/XATest.java        | 10 ++++----
 3 files changed, 9 insertions(+), 59 deletions(-)

diff --git a/tests/extra-tests/pom.xml b/tests/extra-tests/pom.xml
index d7792d513d..c1e54cd70c 100644
--- a/tests/extra-tests/pom.xml
+++ b/tests/extra-tests/pom.xml
@@ -41,6 +41,10 @@
    </properties>
 
    <dependencies>
+      <dependency>
+         <groupId>org.slf4j</groupId>
+         <artifactId>slf4j-api</artifactId>
+      </dependency>
       <dependency>
          <groupId>org.jboss.byteman</groupId>
          <artifactId>byteman</artifactId>
@@ -137,30 +141,6 @@
          <groupId>jakarta.jms</groupId>
          <artifactId>jakarta.jms-api</artifactId>
       </dependency>
-      <dependency>
-         <groupId>org.jboss.logging</groupId>
-         <artifactId>jboss-logging-processor</artifactId>
-         <scope>provided</scope>
-         <optional>true</optional>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.logging</groupId>
-         <artifactId>jboss-logging-annotations</artifactId>
-         <scope>provided</scope>
-         <optional>true</optional>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.logging</groupId>
-         <artifactId>jboss-logging</artifactId>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.logmanager</groupId>
-         <artifactId>jboss-logmanager</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>org.wildfly.common</groupId>
-          <artifactId>wildfly-common</artifactId>
-      </dependency>
       <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/ExtrasTestLogger.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/ExtrasTestLogger.java
deleted file mode 100644
index abca67aaeb..0000000000
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/ExtrasTestLogger.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.tests.extras;
-
-import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Logger;
-import org.jboss.logging.annotations.MessageLogger;
-
-@MessageLogger(projectCode = "AMQTEST")
-public interface ExtrasTestLogger extends BasicLogger {
-
-   /**
-    * The integration test logger.
-    */
-   ExtrasTestLogger LOGGER = Logger.getMessageLogger(ExtrasTestLogger.class, ExtrasTestLogger.class.getPackage().getName());
-}
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java
index f3f4b2d8cc..8c8eb3630b 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java
@@ -38,16 +38,18 @@ import com.arjuna.ats.arjuna.coordinator.TxControl;
 import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
-import org.apache.activemq.artemis.tests.extras.ExtrasTestLogger;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.jboss.tm.TxUtils;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class XATest extends JMSTestBase {
 
+   private static final Logger logger = LoggerFactory.getLogger(XATest.class);
 
    protected TransactionManager tm;
 
@@ -89,9 +91,7 @@ public class XATest extends JMSTestBase {
       if (tm.getTransaction() != null) {
          Transaction tx = tm.suspend();
          if (tx != null) {
-            ExtrasTestLogger.LOGGER.warn("Transaction still associated with thread " + tx +
-                                            " at status " +
-                                            TxUtils.getStatusAsString(tx.getStatus()));
+            logger.warn("Transaction still associated with thread {} at status {}", tx, TxUtils.getStatusAsString(tx.getStatus()));
          }
       }
 
@@ -1319,7 +1319,7 @@ public class XATest extends JMSTestBase {
          // rollback will cause an attempt to deliver messages locally to the original consumers.
          // the original consumer has closed, so it will cancelled to the server
          // the server cancel is asynch, so we need to sleep for a bit to make sure it completes
-         ExtrasTestLogger.LOGGER.trace("Forcing failure");
+         logger.trace("Forcing failure");
          try {
             tm.commit();
             Assert.fail("should not get here");