geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1484001 - in /geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder: ClassLoadersTest.java UrlSetTest.java
Date Fri, 17 May 2013 21:41:35 GMT
Author: rmannibucau
Date: Fri May 17 21:41:34 2013
New Revision: 1484001

URL: http://svn.apache.org/r1484001
Log:
fixing test under win when not using C disk + ignoring native test which doesn't make sense
under win

Modified:
    geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/ClassLoadersTest.java
    geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/UrlSetTest.java

Modified: geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/ClassLoadersTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/ClassLoadersTest.java?rev=1484001&r1=1484000&r2=1484001&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/ClassLoadersTest.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/ClassLoadersTest.java
Fri May 17 21:41:34 2013
@@ -27,6 +27,10 @@ import static org.junit.Assert.assertTru
 public class ClassLoadersTest {
     @Test
     public void testNative() throws MalformedURLException {
+        if (System.getProperty("os.name").toLowerCase().contains("win")) { // we don't want
to test it
+            return;
+        }
+
         final String base = "file:/usr/lib/x86_64-linux-gnu/jni/libatk-wrapper.so.0.0.18";
 
         assertTrue(ClassLoaders.isNative(new URL(base)));

Modified: geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/UrlSetTest.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/UrlSetTest.java?rev=1484001&r1=1484000&r2=1484001&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/UrlSetTest.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/test/java/org/apache/xbean/finder/UrlSetTest.java
Fri May 17 21:41:34 2013
@@ -105,7 +105,9 @@ public class UrlSetTest extends TestCase
     public void testOsxJdk16Filtering() throws Exception {
         String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
 
-        String urlPrefix = osName.contains("windows") ? "file:/C:" : "file:";
+        String urlPrefix = osName.contains("windows") ?
+                "file:/" + new File("/System").getAbsolutePath().substring(0, 2) // C: could
be D: or any other letter
+                : "file:";
 
         final URL[] urls = {
                 new URL(urlPrefix + "/Applications/IntelliJ%20IDEA%2011.app/lib/idea_rt.jar"),
@@ -137,6 +139,7 @@ public class UrlSetTest extends TestCase
                 new URL(urlPrefix + "/Users/dblevins/work/xbean/trunk/xbean-finder/target/test-classes/"),
         };
 
+
         System.setProperty("java.endorsed.dirs", "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed");
         System.setProperty("java.ext.dirs",
                            "/Library/Java/Extensions" + File.pathSeparator



Mime
View raw message