You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ha...@apache.org on 2014/12/16 00:21:49 UTC
[04/17] activemq git commit: Fixed config file paths for Windows
AMQ-5216
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/7536983c
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/7536983c
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/7536983c
Branch: refs/heads/activemq-5.10.x
Commit: 7536983c58217d367e07ab47f95145ccb2ada026
Parents: 1e3f4f1
Author: Kevin Earls <ke...@kevinearls.com>
Authored: Fri Jun 6 16:09:52 2014 +0200
Committer: Hadrian Zbarcea <ha...@apache.org>
Committed: Mon Dec 15 16:35:55 2014 -0500
----------------------------------------------------------------------
.../activemq/config/BrokerXmlConfigStartTest.java | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/7536983c/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;