You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/12/19 17:21:58 UTC
[1/2] activemq-artemis git commit: ARTEMIS-1546 speed up mesh test
Repository: activemq-artemis
Updated Branches:
refs/heads/master a3d297ff9 -> fb34214a1
ARTEMIS-1546 speed up mesh test
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/2197d377
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/2197d377
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/2197d377
Branch: refs/heads/master
Commit: 2197d377c91bffd652db784829eb28c0c106611f
Parents: a3d297f
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Dec 19 10:20:30 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Dec 19 10:20:38 2017 -0500
----------------------------------------------------------------------
.../tests/compatibility/VersionedBaseTest.java | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2197d377/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
index 64183d6..5423d36 100644
--- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
+++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
@@ -18,13 +18,16 @@ import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import org.apache.activemq.artemis.utils.FileUtil;
import org.apache.activemq.artemis.utils.RunnableEx;
import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Assume;
import org.junit.Before;
import org.junit.ClassRule;
@@ -42,6 +45,8 @@ public abstract class VersionedBaseTest {
protected ClassLoader senderClassloader;
protected ClassLoader receiverClassloader;
+ protected static Map<String, ClassLoader> loaderMap = new HashMap<>();
+
public VersionedBaseTest(String server, String sender, String receiver) throws Exception {
this.server = server;
this.sender = sender;
@@ -95,6 +100,11 @@ public abstract class VersionedBaseTest {
receiverClassloader = null;
}
+ @AfterClass
+ public static void cleanup() {
+ loaderMap.clear();
+ }
+
protected static void callMain(ClassLoader loader,
String className,
String script,
@@ -125,6 +135,7 @@ public abstract class VersionedBaseTest {
}
}
+
protected static ClassLoader defineClassLoader(String classPath) throws MalformedURLException {
String[] classPathArray = classPath.split(File.pathSeparator);
URL[] elements = new URL[classPathArray.length];
@@ -140,6 +151,12 @@ public abstract class VersionedBaseTest {
if (name.equals(SNAPSHOT)) {
return VersionedBaseTest.class.getClassLoader();
}
+
+ ClassLoader loader = loaderMap.get(name);
+ if (loader != null) {
+ return loader;
+ }
+
String value = System.getProperty(name);
if (!printed.contains(name)) {
@@ -159,7 +176,11 @@ public abstract class VersionedBaseTest {
Assume.assumeTrue("Cannot run these tests, no classpath found", ok);
}
- return defineClassLoader(value);
+
+ loader = defineClassLoader(value);
+ loaderMap.put(name, loader);
+
+ return loader;
}
protected static List<Object[]> combinatory(Object[] rootSide, Object[] sideLeft, Object[] sideRight) {
[2/2] activemq-artemis git commit: This closes #1731
Posted by cl...@apache.org.
This closes #1731
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fb34214a
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fb34214a
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fb34214a
Branch: refs/heads/master
Commit: fb34214a1af6bcfe0a6e871e125b2a38cc416a90
Parents: a3d297f 2197d37
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Dec 19 12:21:50 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Dec 19 12:21:50 2017 -0500
----------------------------------------------------------------------
.../tests/compatibility/VersionedBaseTest.java | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------