Repository: activemq Updated Branches: refs/heads/trunk b8830ddab -> 07dad1cd5
Fixed config file paths for Windows AMQ-5216 Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/07dad1cd Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/07dad1cd Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/07dad1cd Branch: refs/heads/trunk Commit: 07dad1cd558f9f14d3520018c0da20dd0e6e81e5 Parents: b8830dd Author: Kevin Earls <[email protected]> Authored: Fri Jun 6 16:09:52 2014 +0200 Committer: Kevin Earls <[email protected]> Committed: Fri Jun 6 16:09:52 2014 +0200 ---------------------------------------------------------------------- .../activemq/config/BrokerXmlConfigStartTest.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/07dad1cd/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java ---------------------------------------------------------------------- diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java index 5f83154..ef54c05 100755 --- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java +++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java @@ -19,6 +19,7 @@ package org.apache.activemq.config; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; +import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Collection; @@ -55,19 +56,26 @@ public class BrokerXmlConfigStartTest { private String shortName; @Parameterized.Parameters(name = "{1}") - public static Collection<String[]> getTestParameters() { + public static Collection<String[]> getTestParameters() throws IOException { List<String[]> configUrls = new ArrayList<String[]>(); configUrls.add(new String[]{"xbean:src/release/conf/activemq.xml", "activemq.xml"}); + String osName=System.getProperty("os.name"); + LOG.info("os.name {} ", osName); File sampleConfDir = new File("target/conf"); + String sampleConfDirPath = sampleConfDir.getAbsolutePath(); + if (osName.toLowerCase().contains("windows")) { + sampleConfDirPath = sampleConfDirPath.substring(2); // Chop off drive letter and : + sampleConfDirPath = sampleConfDirPath.replace("\\", "/"); + } + for (File xmlFile : sampleConfDir.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.isFile() && pathname.getName().startsWith("activemq-") && pathname.getName().endsWith("xml"); }})) { - - configUrls.add(new String[]{"xbean:" + sampleConfDir.getAbsolutePath() + "/" + xmlFile.getName(), xmlFile.getName()}); + configUrls.add(new String[]{"xbean:" + sampleConfDirPath + "/" + xmlFile.getName(), xmlFile.getName()}); } return configUrls;
