geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r470013 - /geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java
Date Wed, 01 Nov 2006 17:48:44 GMT
Author: rickmcguire
Date: Wed Nov  1 09:48:44 2006
New Revision: 470013

URL: http://svn.apache.org/viewvc?view=rev&rev=470013
Log:
GERONIMO-1840 NamingPropertiesTest is not compatible with non-Sun VMs.


Modified:
    geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java

Modified: geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java?view=diff&rev=470013&r1=470012&r2=470013
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/test/java/org/apache/geronimo/system/properties/NamingPropertiesTest.java
Wed Nov  1 09:48:44 2006
@@ -35,7 +35,13 @@
         assertEquals(namingProperties.getNamingFactoryUrlPkgs(), FACTORY_URL_PKGS);
         assertEquals(namingProperties.getNamingProviderUrl(), PROVIDER_URL);
 
-        new InitialContext();
-
+        try {
+            // the above assumes we're running on a Sun JVM.  If we can't load the class
first,
+            // we'll skip the attempt at creating the InitialContext.  We've already verified
that the
+            // system properties have been set to the correct values, so this last bit is
largely a formality.
+            Class.forName("NAME_FACTORY_INITIAL");
+            new InitialContext();
+        } catch (ClassNotFoundException e) {
+        }
     }
 }



Mime
View raw message