geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r824425 - /geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
Date Mon, 12 Oct 2009 17:10:25 GMT
Author: rickmcguire
Date: Mon Oct 12 17:10:24 2009
New Revision: 824425

URL: http://svn.apache.org/viewvc?rev=824425&view=rev
Log:
Fix test failure on Windows machines

Modified:
    geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java

Modified: geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java?rev=824425&r1=824424&r2=824425&view=diff
==============================================================================
--- geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
(original)
+++ geronimo/sandbox/djencks/osgi/framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
Mon Oct 12 17:10:24 2009
@@ -84,7 +84,12 @@
         dir = new File(BASEDIR, "target/deployTest");
         dir.mkdirs();
 
-        bundleContext = new MockBundleContext(getClass().getClassLoader(), BASEDIR.getAbsolutePath(),
null, Collections.singletonMap(dir.getAbsolutePath().substring(1), NEW_ID));
+        // On windows, this does not begin with a "/", so don't chop off the drive letter
+        String baseLocation = dir.getAbsolutePath();
+        if (baseLocation.startsWith("/")) {
+            baseLocation = baseLocation.substring(1);
+        }
+        bundleContext = new MockBundleContext(getClass().getClassLoader(), BASEDIR.getAbsolutePath(),
null, Collections.singletonMap(baseLocation, NEW_ID));
         ((MockBundleContext)bundleContext).setConfigurationManager(new MockConfigurationManager());
         File someFile = new File(dir, "someFile");
         someFile.createNewFile();



Mime
View raw message