This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 8685b816f50eb8fdb1719fd951adf9d8b9446662 Author: Clebert Suconic <[email protected]> AuthorDate: Wed Dec 18 16:36:47 2024 -0500 ARTEMIS-5214 Replacing 1.5.5 artemis and 2.0.0 libraries since they are not compatible with the current JDK Also fixing a possible leak --- tests/compatibility-tests/pom.xml | 46 -------------------- .../artemis/tests/compatibility/GroovyRun.java | 49 +++++++++++++++++----- .../ActiveMQJMSClientCompatibilityTest.java | 12 +----- .../tests/compatibility/AddressConfigTest.java | 4 +- ...ctionFactoryConfigurationSerializationTest.java | 4 +- .../tests/compatibility/ExportImportTest.java | 4 +- .../tests/compatibility/FQQNConsumerTest.java | 3 +- .../tests/compatibility/HQClientTopologyTest.java | 2 - .../tests/compatibility/HornetQSoakTest.java | 4 +- .../tests/compatibility/JmsReplyToQueueTest.java | 10 ++--- .../compatibility/JmsReplyToTempQueueTest.java | 10 ++--- .../compatibility/JmsReplyToTempTopicTest.java | 10 ++--- .../tests/compatibility/JmsReplyToTopicTest.java | 10 ++--- .../compatibility/JournalCompatibilityTest.java | 2 - .../artemis/tests/compatibility/MeshTest.java | 7 ++-- .../tests/compatibility/OldAddressSpaceTest.java | 4 +- .../tests/compatibility/PrefixSendAckTest.java | 4 +- .../artemis/tests/compatibility/ReplyToTest.java | 10 ++--- .../artemis/tests/compatibility/SendAckTest.java | 4 +- .../tests/compatibility/SerializationTest.java | 2 - .../tests/compatibility/base/ClasspathBase.java | 10 ++--- 21 files changed, 86 insertions(+), 125 deletions(-) diff --git a/tests/compatibility-tests/pom.xml b/tests/compatibility-tests/pom.xml index a97cb5a911..1883c77cc7 100644 --- a/tests/compatibility-tests/pom.xml +++ b/tests/compatibility-tests/pom.xml @@ -620,29 +620,6 @@ <file>${basedir}/target/ARTEMIS-210.cp</file> </configuration> </execution> - <execution> - <phase>compile</phase> - <goals> - <goal>dependency-scan</goal> - </goals> - <id>200-check</id> - <configuration> - <libListWithDeps> - <arg>org.apache.activemq:artemis-jms-server:2.0.0</arg> - <arg>org.apache.activemq:artemis-jms-client:2.0.0</arg> - <arg>org.apache.activemq:artemis-cli:2.0.0</arg> - <arg>org.apache.activemq:artemis-hornetq-protocol:2.0.0</arg> - <arg>org.apache.activemq:artemis-amqp-protocol:2.0.0</arg> - <arg>org.apache.activemq:artemis-hornetq-protocol:2.0.0</arg> - <arg>org.apache.qpid:qpid-jms-client:0.20.0</arg> - <arg>org.apache.groovy:groovy-all:pom:${groovy.version}</arg> - </libListWithDeps> - <libList> - <arg>org.apache.activemq.tests:compatibility-tests:${project.version}</arg> - </libList> - <file>${basedir}/target/ARTEMIS-200.cp</file> - </configuration> - </execution> <execution> <id>140-check</id> <phase>compile</phase> @@ -665,29 +642,6 @@ <file>${basedir}/target/ARTEMIS-140.cp</file> </configuration> </execution> - <execution> - <id>155-check</id> - <phase>compile</phase> - <goals> - <goal>dependency-scan</goal> - </goals> - <configuration> - <libListWithDeps> - <arg>org.apache.activemq:artemis-jms-server:1.5.5</arg> - <arg>org.apache.activemq:artemis-jms-client:1.5.5</arg> - <arg>org.apache.activemq:artemis-cli:1.5.5</arg> - <arg>org.apache.activemq:artemis-hornetq-protocol:1.5.5</arg> - <arg>org.apache.activemq:artemis-amqp-protocol:1.5.5</arg> - <arg>org.apache.activemq:artemis-hornetq-protocol:1.5.5</arg> - <arg>org.apache.groovy:groovy-all:pom:${groovy.version}</arg> - <arg>org.jboss.marshalling:jboss-marshalling-river:2.0.9.Final</arg> - </libListWithDeps> - <libList> - <arg>org.apache.activemq.tests:compatibility-tests:${project.version}</arg> - </libList> - <file>${basedir}/target/ARTEMIS-155.cp</file> - </configuration> - </execution> <execution> <id>hornetq-235</id> <phase>compile</phase> diff --git a/tests/compatibility-tests/src/main/java/org/apache/activemq/artemis/tests/compatibility/GroovyRun.java b/tests/compatibility-tests/src/main/java/org/apache/activemq/artemis/tests/compatibility/GroovyRun.java index 3a73aa3b75..b284490bf4 100644 --- a/tests/compatibility-tests/src/main/java/org/apache/activemq/artemis/tests/compatibility/GroovyRun.java +++ b/tests/compatibility-tests/src/main/java/org/apache/activemq/artemis/tests/compatibility/GroovyRun.java @@ -31,9 +31,7 @@ public class GroovyRun { public static final String SNAPSHOT = "ARTEMIS-SNAPSHOT"; public static final String JAKARTAEE = "ARTEMIS-JAKARTAEE"; - public static final String ONE_FIVE = "ARTEMIS-155"; public static final String ONE_FOUR = "ARTEMIS-140"; - public static final String TWO_ZERO = "ARTEMIS-200"; public static final String TWO_ONE = "ARTEMIS-210"; public static final String TWO_FOUR = "ARTEMIS-240"; public static final String TWO_SIX_THREE = "ARTEMIS-263"; @@ -48,13 +46,42 @@ public class GroovyRun { public static final String HORNETQ_247 = "HORNETQ-247"; public static final String AMQ_5_11 = "AMQ_5_11"; - public static Binding binding = new Binding(); - public static GroovyShell shell = new GroovyShell(binding); + private static Binding theBinding; + private static GroovyShell theShell; + public static void clear() { - List<String> variablesToRemove = new ArrayList<>(); - variablesToRemove.addAll(binding.getVariables().keySet()); - variablesToRemove.forEach(v -> binding.removeVariable(v)); + try { + if (theBinding != null) { + List<String> variablesToRemove = new ArrayList<>(theBinding.getVariables().keySet()); + variablesToRemove.forEach(theBinding::removeVariable); + theBinding.setMetaClass(null); + } + } finally { + theBinding = null; + theShell = null; + } + } + + private static GroovyShell getShell() { + initShell(); + + return theShell; + + } + + private static Binding getBinding() { + initShell(); + + return theBinding; + + } + + private static void initShell() { + if (theShell == null || theBinding == null) { + theBinding = new Binding(); + theShell = new GroovyShell(theBinding); + } } /** @@ -83,21 +110,21 @@ public class GroovyRun { setVariable(argVariableName, arg); - return shell.evaluate(scriptURI); + return getShell().evaluate(scriptURI); } public static void setVariable(String name, Object arg) { - binding.setVariable(name, arg); + getBinding().setVariable(name, arg); } public static Object getVariable(String name) { - return binding.getVariable(name); + return getBinding().getVariable(name); } // Called with reflection public static Object execute(String script) throws Throwable { - return shell.evaluate(script); + return getShell().evaluate(script); } public static void assertNotNull(Object value) { diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ActiveMQJMSClientCompatibilityTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ActiveMQJMSClientCompatibilityTest.java index 2077f6a8cc..f42c60297a 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ActiveMQJMSClientCompatibilityTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ActiveMQJMSClientCompatibilityTest.java @@ -18,7 +18,6 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assumptions.assumeTrue; @@ -54,6 +53,8 @@ public class ActiveMQJMSClientCompatibilityTest extends ClasspathBase { System.clearProperty(ActiveMQJMSClient.class.getName() + ".enable1xPrefixes"); } + clearClassLoader(loader); + } @Test @@ -83,13 +84,4 @@ public class ActiveMQJMSClientCompatibilityTest extends ClasspathBase { } - @Test - - // The purpose here is just to validate the test itself. Nothing to be fixed here - public void testActiveMQJMSCompatibility_1XPrefix_ONE_FIVE() throws Exception { - ClassLoader loader = getClasspath(ONE_FIVE, false); - - evaluate(loader, "ActiveMQJMSClientCompatibilityTest/validateClient.groovy"); - - } } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/AddressConfigTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/AddressConfigTest.java index e8ffab3b06..34c3916583 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/AddressConfigTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/AddressConfigTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -55,7 +55,7 @@ public class AddressConfigTest extends VersionedBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT})); + combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT})); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ConnectionFactoryConfigurationSerializationTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ConnectionFactoryConfigurationSerializationTest.java index cbb1dbe8dd..61ea444e1c 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ConnectionFactoryConfigurationSerializationTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ConnectionFactoryConfigurationSerializationTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; @@ -53,7 +53,7 @@ public class ConnectionFactoryConfigurationSerializationTest extends VersionedBa // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.addAll(combinatory(new Object[]{null}, new Object[]{ONE_FIVE, SNAPSHOT, TWO_FOUR}, new Object[]{ONE_FIVE, SNAPSHOT, TWO_FOUR})); + combinations.addAll(combinatory(new Object[]{null}, new Object[]{ONE_FOUR, SNAPSHOT, TWO_FOUR}, new Object[]{ONE_FOUR, SNAPSHOT, TWO_FOUR})); return combinations; } 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 65a489f771..fa71e448b8 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 @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assumptions.assumeFalse; @@ -54,7 +54,7 @@ public class ExportImportTest extends VersionedBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.add(new Object[]{null, ONE_FIVE, SNAPSHOT}); + combinations.add(new Object[]{null, ONE_FOUR, SNAPSHOT}); combinations.add(new Object[]{null, SNAPSHOT, SNAPSHOT}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/FQQNConsumerTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/FQQNConsumerTest.java index 7791ba3db1..ed8be73502 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/FQQNConsumerTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/FQQNConsumerTest.java @@ -22,7 +22,6 @@ import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_ONE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_SEVEN_ZERO; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_SIX_THREE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_ZERO; import java.util.ArrayList; import java.util.Collection; @@ -45,7 +44,7 @@ public class FQQNConsumerTest extends ServerBase { List<Object[]> combinations = new ArrayList<>(); // FQQN was added into 2.7.0, hence we only test the server as SNAPSHOT or TWO_SEVEN_ZERO - List testsList = combinatory(new Object[]{SNAPSHOT}, new Object[]{SNAPSHOT, TWO_ZERO, TWO_FOUR, TWO_ONE, TWO_SIX_THREE, TWO_SEVEN_ZERO}, new Object[]{SNAPSHOT, TWO_ZERO, TWO_FOUR, TWO_ONE, TWO_SIX_THREE, TWO_SEVEN_ZERO}); + List testsList = combinatory(new Object[]{SNAPSHOT}, new Object[]{SNAPSHOT, TWO_FOUR, TWO_ONE, TWO_SIX_THREE, TWO_SEVEN_ZERO}, new Object[]{SNAPSHOT, TWO_FOUR, TWO_ONE, TWO_SIX_THREE, TWO_SEVEN_ZERO}); addCombinations(testsList, null, new Object[] {TWO_SEVEN_ZERO}, new Object[]{SNAPSHOT, TWO_SEVEN_ZERO}, new Object[]{SNAPSHOT, TWO_SEVEN_ZERO}); return testsList; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HQClientTopologyTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HQClientTopologyTest.java index 1a129c5dd3..eed40e35ca 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HQClientTopologyTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HQClientTopologyTest.java @@ -18,7 +18,6 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_235; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import org.apache.activemq.artemis.tests.compatibility.base.VersionedBase; @@ -46,7 +45,6 @@ public class HQClientTopologyTest extends VersionedBase { List<Object[]> combinations = new ArrayList<>(); combinations.add(new Object[]{SNAPSHOT, HORNETQ_235, HORNETQ_235}); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java index d487ca1a32..a76ddd83a7 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java @@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_235; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -43,7 +43,7 @@ public class HornetQSoakTest extends ClasspathBase { public void setUp() throws Throwable { this.artemisClassLoader = getClasspath(SNAPSHOT); - this.artemis1XClassLoader = getClasspath(ONE_FIVE); + this.artemis1XClassLoader = getClasspath(ONE_FOUR); this.hornetqClassLoader = getClasspath(HORNETQ_235); FileUtil.deleteDirectory(serverFolder); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToQueueTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToQueueTest.java index 6b0f5f2072..1da5e431ec 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToQueueTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToQueueTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -43,15 +43,15 @@ public class JmsReplyToQueueTest extends VersionedBase { @Parameters(name = "server={0}, producer={1}, consumer={2}") public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); - combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); + combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, SNAPSHOT}); + combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FOUR}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE}); combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE}); - combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE}); - combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE}); + combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FOUR}); + combinations.add(new Object[]{JAKARTAEE, ONE_FOUR, JAKARTAEE}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempQueueTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempQueueTest.java index c8d95e0476..e3f26ea1da 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempQueueTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempQueueTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -43,14 +43,14 @@ public class JmsReplyToTempQueueTest extends VersionedBase { @Parameters(name = "server={0}, producer={1}, consumer={2}") public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); - combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); + combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, SNAPSHOT}); + combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FOUR}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE}); - combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE}); - combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE}); + combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FOUR}); + combinations.add(new Object[]{JAKARTAEE, ONE_FOUR, JAKARTAEE}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempTopicTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempTopicTest.java index 0745773b9e..bdc0d1cfaa 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempTopicTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTempTopicTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -43,14 +43,14 @@ public class JmsReplyToTempTopicTest extends VersionedBase { @Parameters(name = "server={0}, producer={1}, consumer={2}") public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); - combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); + combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, SNAPSHOT}); + combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FOUR}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE}); - combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE}); - combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE}); + combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FOUR}); + combinations.add(new Object[]{JAKARTAEE, ONE_FOUR, JAKARTAEE}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTopicTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTopicTest.java index 7acbf12658..ebf1d1f2d6 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTopicTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JmsReplyToTopicTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.JAKARTAEE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -43,14 +43,14 @@ public class JmsReplyToTopicTest extends VersionedBase { @Parameters(name = "server={0}, producer={1}, consumer={2}") public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, SNAPSHOT}); - combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FIVE}); + combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, SNAPSHOT}); + combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, ONE_FOUR}); combinations.add(new Object[]{SNAPSHOT, SNAPSHOT, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, JAKARTAEE}); combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, SNAPSHOT}); combinations.add(new Object[]{JAKARTAEE, SNAPSHOT, JAKARTAEE}); - combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FIVE}); - combinations.add(new Object[]{JAKARTAEE, ONE_FIVE, JAKARTAEE}); + combinations.add(new Object[]{JAKARTAEE, JAKARTAEE, ONE_FOUR}); + combinations.add(new Object[]{JAKARTAEE, ONE_FOUR, JAKARTAEE}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JournalCompatibilityTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JournalCompatibilityTest.java index 0703f40072..21e7bf22f4 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JournalCompatibilityTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/JournalCompatibilityTest.java @@ -20,7 +20,6 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_ONE; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_ZERO; import java.util.ArrayList; import java.util.Collection; @@ -53,7 +52,6 @@ public class JournalCompatibilityTest extends VersionedBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.add(new Object[]{null, TWO_ZERO, SNAPSHOT}); combinations.add(new Object[]{null, TWO_ONE, SNAPSHOT}); combinations.add(new Object[]{null, TWO_FOUR, SNAPSHOT}); // the purpose on this one is just to validate the test itself. diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java index 0e9287c006..692af37b58 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java @@ -19,7 +19,6 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_235; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_247; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; @@ -58,9 +57,9 @@ public class MeshTest extends ServerBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.addAll(combinatory(SNAPSHOT, new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, TWO_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FIVE, TWO_FOUR, SNAPSHOT, HORNETQ_235})); - combinations.addAll(combinatory(SNAPSHOT, new Object[]{ONE_FIVE}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT})); - combinations.addAll(combinatory(SNAPSHOT, new Object[]{HORNETQ_235}, new Object[]{ONE_FIVE, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FIVE, SNAPSHOT, HORNETQ_235})); + combinations.addAll(combinatory(SNAPSHOT, new Object[]{SNAPSHOT}, new Object[]{ONE_FOUR, TWO_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FOUR, TWO_FOUR, SNAPSHOT, HORNETQ_235})); + combinations.addAll(combinatory(SNAPSHOT, new Object[]{ONE_FOUR}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT})); + combinations.addAll(combinatory(SNAPSHOT, new Object[]{HORNETQ_235}, new Object[]{ONE_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FOUR, SNAPSHOT, HORNETQ_235})); combinations.addAll(combinatory(SNAPSHOT, new Object[]{HORNETQ_247}, new Object[]{SNAPSHOT, HORNETQ_247}, new Object[]{SNAPSHOT, HORNETQ_247})); combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, ONE_FOUR}); combinations.add(new Object[]{SNAPSHOT, TWO_TWENTYEIGHT_ZERO, TWO_TWENTYEIGHT_ZERO}); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/OldAddressSpaceTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/OldAddressSpaceTest.java index f6471e0fa3..d2e981f958 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/OldAddressSpaceTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/OldAddressSpaceTest.java @@ -16,8 +16,8 @@ */ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.ArrayList; @@ -42,7 +42,7 @@ public class OldAddressSpaceTest extends VersionedBase { @Parameters(name = "server={0}, producer={1}, consumer={2}") public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT})); + combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{TWO_FOUR, SNAPSHOT}, new Object[]{TWO_FOUR, SNAPSHOT})); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/PrefixSendAckTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/PrefixSendAckTest.java index a57593892c..298b686a67 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/PrefixSendAckTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/PrefixSendAckTest.java @@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_247; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; @@ -38,7 +38,7 @@ public class PrefixSendAckTest extends ServerBase { public static Collection getParameters() { List<Object[]> combinations = new ArrayList<>(); - combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, HORNETQ_247, TWO_FOUR, SNAPSHOT}, new Object[]{ONE_FIVE, HORNETQ_247, TWO_FOUR, SNAPSHOT})); + combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FOUR, HORNETQ_247, TWO_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, HORNETQ_247, TWO_FOUR, SNAPSHOT})); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ReplyToTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ReplyToTest.java index 82d957f910..011268402d 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ReplyToTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/ReplyToTest.java @@ -17,8 +17,8 @@ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; import static org.junit.jupiter.api.Assumptions.assumeTrue; import java.io.File; @@ -107,11 +107,11 @@ public class ReplyToTest extends ServerBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); - combinations.add(new Object[]{ONE_FIVE, SNAPSHOT, SNAPSHOT}); + combinations.add(new Object[]{SNAPSHOT, TWO_FOUR, TWO_FOUR}); + combinations.add(new Object[]{TWO_FOUR, SNAPSHOT, SNAPSHOT}); - combinations.add(new Object[]{ONE_FIVE, SNAPSHOT, ONE_FIVE}); - combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, SNAPSHOT}); + combinations.add(new Object[]{TWO_FOUR, SNAPSHOT, TWO_FOUR}); + combinations.add(new Object[]{TWO_FOUR, TWO_FOUR, SNAPSHOT}); return combinations; } diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SendAckTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SendAckTest.java index a6e57fd41b..828f35ff9e 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SendAckTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SendAckTest.java @@ -20,7 +20,7 @@ package org.apache.activemq.artemis.tests.compatibility; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_247; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; +import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR; import java.util.ArrayList; import java.util.Collection; @@ -50,7 +50,7 @@ public class SendAckTest extends ServerBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.addAll(combinatory(new Object[]{SNAPSHOT, ONE_FIVE}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT})); + combinations.addAll(combinatory(new Object[]{SNAPSHOT, ONE_FOUR}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT})); // not every combination on two four would make sense.. as there's a compatibility issue between 2.4 and 1.4 when crossing consumers and producers combinations.add(new Object[]{TWO_FOUR, SNAPSHOT, SNAPSHOT}); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java index f00ae19a87..4afdd004a2 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/SerializationTest.java @@ -17,7 +17,6 @@ package org.apache.activemq.artemis.tests.compatibility; -import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_TEN_ZERO; @@ -53,7 +52,6 @@ public class SerializationTest extends VersionedBase { // combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE}); // combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE}); - combinations.addAll(combinatory(new Object[]{null}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT})); combinations.add(new Object[] {null, TWO_TEN_ZERO, SNAPSHOT}); combinations.add(new Object[] {null, SNAPSHOT, TWO_TEN_ZERO}); return combinations; diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/base/ClasspathBase.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/base/ClasspathBase.java index 02994e18a8..4b8a900ca8 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/base/ClasspathBase.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/base/ClasspathBase.java @@ -19,7 +19,6 @@ package org.apache.activemq.artemis.tests.compatibility.base; import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assumptions.assumeTrue; import java.io.File; import java.lang.reflect.Method; @@ -45,9 +44,10 @@ public class ClasspathBase { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @AfterAll - public static void cleanup() { - loaderMap.values().forEach((cl -> clearClassLoader(cl))); + public static void cleanup() throws Exception { + loaderMap.values().forEach((ClasspathBase::clearClassLoader)); clearClassLoader(VersionedBase.class.getClassLoader()); + loaderMap.clear(); } public static void clearClassLoader(ClassLoader loader) { @@ -133,10 +133,6 @@ public class ClasspathBase { protected ClassLoader getClasspath(String name, boolean forceNew) throws Exception { - if (name.equals(GroovyRun.ONE_FIVE) || name.equals(GroovyRun.TWO_ZERO)) { - assumeTrue(getJavaVersion() < 16, "This version of artemis cannot be ran against JDK16+"); - } - if (!forceNew) { if (name.equals(SNAPSHOT)) { GroovyRun.clear(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
