diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-10-12 11:44:13 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-10-12 11:44:13 +0000 |
| commit | 65cba5397294ddd5349bdb9837c4a10d91f2ca0b (patch) | |
| tree | 5ac98649e42a8d48ca46e94cae1120dde99044dc /qpid/java/perftests/src/test | |
| parent | a0b7800e8d8554f76dcd8715768b08b6e8b9c507 (diff) | |
| download | qpid-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/src/test')
2 files changed, 6 insertions, 2 deletions
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); |
