[jboss-cvs] JBossAS SVN: r60975 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 27 21:53:43 EST 2007


Author: bstansberry at jboss.com
Date: 2007-02-27 21:53:42 -0500 (Tue, 27 Feb 2007)
New Revision: 60975

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java
Log:
If server has -u set, client should use the value for HA-JNDI discovery

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java	2007-02-28 02:52:10 UTC (rev 60974)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/naming/test/SimpleUnitTestCase.java	2007-02-28 02:53:42 UTC (rev 60975)
@@ -41,6 +41,8 @@
  */
 public class SimpleUnitTestCase extends JBossTestCase
 {
+   private static final String DISCOVERY_GROUP = System.getProperty("jbosstest.udpGroup", "");
+   
    /**
     * Constructor for the SimpleUnitTestCase object
     *
@@ -228,7 +230,7 @@
     *
     * @throws Exception
     */
-   public void testHaParitionName() throws Exception
+   public void testHaPartitionName() throws Exception
    {
       getLog().debug("+++ testHjnp.localAddressaParitionName");
       Properties env = new Properties();
@@ -236,6 +238,12 @@
       env.setProperty(Context.PROVIDER_URL, "jnp://" + serverHost + ":65535/");
       env.setProperty("jnp.localAddress", serverHost);      
       env.setProperty("jnp.partitionName", "DefaultPartition");
+      if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)
+      {
+         // Server is not listening for discovery on std multicast address
+         // so we need to use the correct one
+         env.setProperty("jnp.discoveryGroup", DISCOVERY_GROUP);
+      }
       getLog().debug("Creating InitialContext with env="+env);
       InitialContext ctx = new InitialContext(env);
       getLog().debug("Created InitialContext");
@@ -278,6 +286,12 @@
       env.setProperty(Context.PROVIDER_URL, "jnp://" + serverHost + ":65535/");
       env.setProperty("jnp.localAddress", serverHost);      
       env.setProperty("jnp.discoveryPort", "1102");
+      if (DISCOVERY_GROUP != null && "".equals(DISCOVERY_GROUP) == false)
+      {
+         // Server is not listening for discovery on std multicast address
+         // so we need to use the correct one
+         env.setProperty("jnp.discoveryGroup", DISCOVERY_GROUP);
+      }
       getLog().debug("Creating InitialContext with env="+env);
       InitialContext ctx = new InitialContext(env);
       getLog().debug("Created InitialContext");




More information about the jboss-cvs-commits mailing list