summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java2
-rwxr-xr-xqpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java22
-rw-r--r--qpid/java/test-profiles/testprofile.defaults6
3 files changed, 11 insertions, 19 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java b/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
index ce9e681eaf..2914244103 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
@@ -115,7 +115,7 @@ public class PropertiesFileInitialContextFactoryTest extends QpidTestCase
setTestSystemProperty(ClientProperties.DEST_SYNTAX, "ADDR");
setTestSystemProperty(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
- setTestSystemProperty(InitialContext.PROVIDER_URL, "file://" + f.getCanonicalPath());
+ setTestSystemProperty(InitialContext.PROVIDER_URL, f.toURI().toURL().toString());
InitialContext context = new InitialContext();
Destination dest = (Destination) context.lookup("topicExchange");
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
index 605296d55c..3828cd8ea0 100755
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
@@ -249,20 +249,12 @@ public class QpidBrokerTestCase extends QpidTestCase
private void initialiseLogConfigFile()
{
- try
- {
- _logger.info("About to initialise log config file from system property: " + LOG4J_CONFIG_FILE_PATH);
+ _logger.info("About to initialise log config file from system property: " + LOG4J_CONFIG_FILE_PATH);
- URI uri = new URI("file", LOG4J_CONFIG_FILE_PATH, null);
- _logConfigFile = new File(uri);
- if(!_logConfigFile.exists())
- {
- throw new RuntimeException("Log config file " + _logConfigFile.getAbsolutePath() + " does not exist");
- }
- }
- catch (URISyntaxException e)
+ _logConfigFile = new File(LOG4J_CONFIG_FILE_PATH);
+ if(!_logConfigFile.exists())
{
- throw new RuntimeException("Couldn't create URI from log4.configuration: " + LOG4J_CONFIG_FILE_PATH, e);
+ throw new RuntimeException("Log config file " + _logConfigFile.getAbsolutePath() + " does not exist");
}
}
@@ -633,17 +625,17 @@ public class QpidBrokerTestCase extends QpidTestCase
public String getTestConfigFile(int port)
{
- return _output + "/" + getTestQueueName() + "-" + port + "-config";
+ return _output + File.separator + getTestQueueName() + "-" + port + "-config";
}
public String getTestVirtualhostsFile(int port)
{
- return _output + "/" + getTestQueueName() + "-" + port + "-virtualhosts.xml";
+ return _output + File.separator + getTestQueueName() + "-" + port + "-virtualhosts.xml";
}
private String relativeToQpidHome(String file)
{
- return file.replace(System.getProperty(QPID_HOME,"QPID_HOME") + "/","");
+ return file.replace(System.getProperty(QPID_HOME,"QPID_HOME") + File.separator,"");
}
protected String getPathRelativeToWorkingDirectory(String file)
diff --git a/qpid/java/test-profiles/testprofile.defaults b/qpid/java/test-profiles/testprofile.defaults
index 033da12a97..ccd31a5d1e 100644
--- a/qpid/java/test-profiles/testprofile.defaults
+++ b/qpid/java/test-profiles/testprofile.defaults
@@ -17,7 +17,7 @@
# under the License.
#
java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-java.naming.provider.url=${test.profiles}/test-provider.properties
+java.naming.provider.url=${test.profiles}${file.separator}test-provider.properties
broker.ready=Listening on TCP
broker.config=build/etc/config-systests.json
@@ -36,7 +36,7 @@ root.logging.level=warn
# System property log4j.configuration is used by log4j.
# QpidBrokerTestCase uses log4j.configuration.file to construct a java.io.File, eg for log configuration of spawned brokers.
-log4j.configuration.file=${test.profiles}/log4j-test.xml
+log4j.configuration.file=${test.profiles}${file.separator}log4j-test.xml
log4j.configuration=file:///${log4j.configuration.file}
log4j.debug=false
@@ -63,6 +63,6 @@ exclude.modules=none
profile.clustered=false
broker.config-store-type=json
-broker.virtualhosts-config="${QPID_HOME}/etc/virtualhosts-systests.xml"
+broker.virtualhosts-config="${QPID_HOME}${file.separator}etc${file.separator}virtualhosts-systests.xml"