This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 196e604778 NO-JIRA: suppress significant teardown stacktraces after 
compatibility test that is a no-op...make test itself skip
196e604778 is described below

commit 196e604778745349fca2deae44bab397cc9fa5b4
Author: Robbie Gemmell <[email protected]>
AuthorDate: Fri Jun 17 13:02:37 2022 +0100

    NO-JIRA: suppress significant teardown stacktraces after compatibility test 
that is a no-op...make test itself skip
---
 .../artemis/tests/compatibility/ExportImportTest.java   | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git 
a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ExportImportTest.java
 
b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ExportImportTest.java
index 903165ff2c..f7852b40ce 100644
--- 
a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ExportImportTest.java
+++ 
b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ExportImportTest.java
@@ -24,6 +24,7 @@ import java.util.List;
 import org.apache.activemq.artemis.tests.compatibility.base.VersionedBase;
 import org.apache.activemq.artemis.utils.FileUtil;
 import org.junit.After;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,6 +49,7 @@ import static 
org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT
 @RunWith(Parameterized.class)
 public class ExportImportTest extends VersionedBase {
    private String serverScriptToUse;
+   private boolean skipTearDownCleanup = false;
 
    // this will ensure that all tests in this class are run twice,
    // once with "true" passed to the class' constructor and once with "false"
@@ -81,6 +83,11 @@ public class ExportImportTest extends VersionedBase {
 
    @After
    public void tearDown() {
+      if (skipTearDownCleanup) {
+         // Skip server teardown when test is no-op, avoids a chunk of 
stacktrace
+         return;
+      }
+
       try {
          stopServer(serverClassloader);
       } catch (Throwable ignored) {
@@ -100,10 +107,12 @@ public class ExportImportTest extends VersionedBase {
 
    @Test
    public void testSendReceivelegacy() throws Throwable {
-      if (!sender.equals(SNAPSHOT)) {
-         // makes no sense on snapshot
-         internalSendReceive(true);
-      }
+      // makes no sense on snapshot
+      boolean isSenderSnapshot = SNAPSHOT.equals(sender);
+      skipTearDownCleanup = isSenderSnapshot;
+      Assume.assumeFalse("This test only applies to old version senders", 
isSenderSnapshot);
+
+      internalSendReceive(true);
    }
 
    public void internalSendReceive(boolean legacyPrefixes) throws Throwable {

Reply via email to