summaryrefslogtreecommitdiff
path: root/qpid/java/perftests
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-10-12 11:44:13 +0000
committerRobert Gemmell <robbie@apache.org>2012-10-12 11:44:13 +0000
commit65cba5397294ddd5349bdb9837c4a10d91f2ca0b (patch)
tree5ac98649e42a8d48ca46e94cae1120dde99044dc /qpid/java/perftests
parenta0b7800e8d8554f76dcd8715768b08b6e8b9c507 (diff)
downloadqpid-python-65cba5397294ddd5349bdb9837c4a10d91f2ca0b.tar.gz
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 <phil@philharveyonline.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397519 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests')
-rw-r--r--qpid/java/perftests/build.xml2
-rw-r--r--qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java4
-rw-r--r--qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/JavaScriptConfigEvaluatorTest.java4
-rw-r--r--qpid/java/perftests/visualisation-jfc/build.xml2
4 files changed, 8 insertions, 4 deletions
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 @@
</condition>
<property name="module.depends" value="client common"/>
- <property name="module.test.depends" value="systests broker common/test management/common ${perftests.optional.test.depends}"/>
+ <property name="module.test.depends" value="systests broker common/tests management/common ${perftests.optional.test.depends}"/>
<import file="../module.xml"/>
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<TestConfig> 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 @@
-->
<project name="visualisation-jfc" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
<property name="module.depends" value="perftests" />
- <property name="module.test.depends" value="test common common/test" />
+ <property name="module.test.depends" value="common common/tests" />
<property name="module.manifest" value="true" />