diff options
| author | Keith Wall <kwall@apache.org> | 2012-07-17 15:13:55 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2012-07-17 15:13:55 +0000 |
| commit | 0723961495e6b68f275873e93cedee33f8f1430c (patch) | |
| tree | cff12da79ff9406ce89c194c3e73344951eb2d60 /qpid/java/perftests/src/test | |
| parent | 2fac0974faa68cd8789b5397359d5528febf9477 (diff) | |
| download | qpid-python-0723961495e6b68f275873e93cedee33f8f1430c.tar.gz | |
QPID-4103: now getting test file paths as URIs instead of URLs so that they still work when the path contains spaces.
Applied patch from Philip Harvey <phil@philharveyonline.com>.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1362536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/src/test')
2 files changed, 3 insertions, 3 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 e7b6cdd3c6..257f139849 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 @@ -111,7 +111,7 @@ public class ConfigReaderTest extends TestCase public void testReadsJS() throws Exception { ConfigReader configReader = new ConfigReader(); - String path = getClass().getResource("ConfigReaderTest-test-config.js").getPath(); + String path = getClass().getResource("ConfigReaderTest-test-config.js").toURI().getPath(); _config = configReader.getConfigFromFile(path); List<TestConfig> testConfigs = _config.getTestConfigs(); assertEquals("Unexpected number of tests", 2, testConfigs.size()); 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 6d4b3f6290..7edb62f060 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 @@ -33,14 +33,14 @@ public class JavaScriptConfigEvaluatorTest extends TestCase { public void testEvaluateJavaScript() throws Exception { - String jsFilePath = getClass().getResource("JavaScriptConfigEvaluatorTest-test-config.js").getPath(); + String jsFilePath = getClass().getResource("JavaScriptConfigEvaluatorTest-test-config.js").toURI().getPath(); String rawConfig = new JavaScriptConfigEvaluator().evaluateJavaScript(jsFilePath); String config = formatForComparison(rawConfig); assertTrue(config.contains("\"_iterationNumber\":1")); - File expectedJsonFile = new File(getClass().getResource("JavaScriptConfigEvaluatorTest-expected-json.json").getPath()); + File expectedJsonFile = new File(getClass().getResource("JavaScriptConfigEvaluatorTest-expected-json.json").toURI().getPath()); String rawExpected = FileUtils.readFileAsString(expectedJsonFile); String expected = formatForComparison(rawExpected); |
