From 65cba5397294ddd5349bdb9837c4a10d91f2ca0b Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Fri, 12 Oct 2012 11:44:13 +0000 Subject: QPID-4335, QPID-4353: Refactored broker plugins to use simplified ServiceLoader-based model rather than embedding Felix to use OSGi. Removed the ability to reload security configuration because this feature is not very useful in its current form and was making our code hard to refactor. Modified all tests to use jars rather than classes. This makes them closer to real-world deployments, e.g. the META-INF/services file is read from within the jar. Also moved various system tests from their respective modules into "systests". This removes the need for most modules to depend on systests, thus simplifying our dependency graph. Applied patch from myself, Keith Wall and Phil Harvey git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397519 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/perftests/build.xml | 2 +- .../org/apache/qpid/disttest/controller/config/ConfigReaderTest.java | 4 +++- .../disttest/controller/config/JavaScriptConfigEvaluatorTest.java | 4 +++- qpid/java/perftests/visualisation-jfc/build.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'qpid/java/perftests') diff --git a/qpid/java/perftests/build.xml b/qpid/java/perftests/build.xml index c59986c06d..d29649ad68 100644 --- a/qpid/java/perftests/build.xml +++ b/qpid/java/perftests/build.xml @@ -33,7 +33,7 @@ - + diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java index 257f139849..1f99fdd9d4 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java +++ b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java @@ -27,6 +27,7 @@ import junit.framework.TestCase; import org.apache.qpid.disttest.ConfigFileTestHelper; import org.apache.qpid.disttest.client.property.PropertyValue; +import org.apache.qpid.test.utils.TestFileUtils; public class ConfigReaderTest extends TestCase { @@ -111,8 +112,9 @@ public class ConfigReaderTest extends TestCase public void testReadsJS() throws Exception { ConfigReader configReader = new ConfigReader(); - String path = getClass().getResource("ConfigReaderTest-test-config.js").toURI().getPath(); + String path = TestFileUtils.createTempFileFromResource(this, "ConfigReaderTest-test-config.js").getAbsolutePath(); _config = configReader.getConfigFromFile(path); + List testConfigs = _config.getTestConfigs(); assertEquals("Unexpected number of tests", 2, testConfigs.size()); TestConfig testConfig1 = _config.getTestConfigs().get(0); diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java index eb4063888b..21c437febf 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java +++ b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java @@ -25,6 +25,8 @@ import static org.apache.commons.beanutils.PropertyUtils.getProperty; import java.util.List; import java.util.TreeMap; +import org.apache.qpid.test.utils.TestFileUtils; + import junit.framework.TestCase; import com.google.gson.Gson; @@ -33,7 +35,7 @@ public class JavaScriptConfigEvaluatorTest extends TestCase { public void testEvaluateJavaScript() throws Exception { - String jsFilePath = getClass().getResource("JavaScriptConfigEvaluatorTest-test-config.js").toURI().getPath(); + String jsFilePath = TestFileUtils.createTempFileFromResource(this, "JavaScriptConfigEvaluatorTest-test-config.js").getAbsolutePath(); String rawConfig = new JavaScriptConfigEvaluator().evaluateJavaScript(jsFilePath); diff --git a/qpid/java/perftests/visualisation-jfc/build.xml b/qpid/java/perftests/visualisation-jfc/build.xml index 436ad5ae2a..04deb39d36 100644 --- a/qpid/java/perftests/visualisation-jfc/build.xml +++ b/qpid/java/perftests/visualisation-jfc/build.xml @@ -18,7 +18,7 @@ --> - + -- cgit v1.2.1