[jboss-cvs] JBoss Messaging SVN: r3666 - branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 5 18:37:47 EST 2008


Author: apwalker
Date: 2008-02-05 18:37:47 -0500 (Tue, 05 Feb 2008)
New Revision: 3666

Modified:
   branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
   branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
Log:
JBMESSAGING-1222 - Workaround for Remote-bisocket JMS test failures on Mac OSX JVM

Modified: branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2008-02-04 14:58:45 UTC (rev 3665)
+++ branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java	2008-02-05 23:37:47 UTC (rev 3666)
@@ -43,6 +43,8 @@
 import javax.management.NotificationListener;
 import javax.management.ObjectName;
 import javax.transaction.UserTransaction;
+
+import java.io.File;
 import java.net.URL;
 import java.util.*;
 
@@ -905,6 +907,11 @@
    public void poisonTheServer(int type) throws Exception
    {
       URL url = this.getClass().getClassLoader().getResource("poison.xml");
+      if(url == null) // JBMESSAGING-1222 - Hack for OSX JVM Bug when testing the remote connectors
+      {	              //(Assumes tests are being executed is the jboss-messaging/tests directory)
+      
+    	  url = (new File("etc/poison.xml")).toURL();
+      }
       AspectXmlLoader.deployXML(url);
 
       log.debug(url + " deployed");

Modified: branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java
===================================================================
--- branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2008-02-04 14:58:45 UTC (rev 3665)
+++ branches/Branch_Stable/tests/src/org/jboss/test/messaging/tools/container/ServiceContainer.java	2008-02-05 23:37:47 UTC (rev 3666)
@@ -61,6 +61,7 @@
 import javax.transaction.UserTransaction;
 import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.InputStream;
 import java.net.URL;
 import java.sql.*;
@@ -935,10 +936,14 @@
    private void readConfigurationFile() throws Exception
    {
       InputStream cs = getClass().getClassLoader().getResourceAsStream(CONFIGURATION_FILE_NAME);
-      if (cs == null)
-      {
-         throw new Exception("Cannot file container's configuration file " +
+      if (cs == null) // JBMESSAGING-1222 - Hack for OSX JVM Bug when testing the remote connectors
+      {	              //(Assumes tests are being executed is the jboss-messaging/tests directory)
+    	 cs = new FileInputStream("etc/" + CONFIGURATION_FILE_NAME);
+    	 if(cs == null)
+    	 {
+    		 throw new Exception("Cannot file container's configuration file " +
                              CONFIGURATION_FILE_NAME + ". Make sure it is in the classpath.");
+    	 }
       }
 
       try




More information about the jboss-cvs-commits mailing list