[jboss-cvs] JBossAS SVN: r60929 - trunk/testsuite/src/main/org/jboss/test/cluster/jmx/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 26 23:03:48 EST 2007
Author: bstansberry at jboss.com
Date: 2007-02-26 23:03:48 -0500 (Mon, 26 Feb 2007)
New Revision: 60929
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java
Log:
Don't use HA-JNDI discovery; it's not needed
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java 2007-02-27 03:53:59 UTC (rev 60928)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/jmx/test/HAInvokerUnitTestCase.java 2007-02-27 04:03:48 UTC (rev 60929)
@@ -21,6 +21,11 @@
*/
package org.jboss.test.cluster.jmx.test;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
import org.jboss.invocation.ServiceUnavailableException;
import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
import org.jboss.test.JBossClusteredTestCase;
@@ -54,9 +59,16 @@
public void testHAProxyFailover()
throws Exception
{
- getLog().debug("testHAProxyFailover");
+ getLog().debug("testHAProxyFailover");
- HAServiceRemote remote = (HAServiceRemote) getInitialContext().lookup("jmx/HAService");
+ String[] urls = getNamingURLs();
+ Properties env = new Properties();
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+ "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.PROVIDER_URL, urls[0]);
+ Context ctx = new InitialContext(env);
+
+ HAServiceRemote remote = (HAServiceRemote) ctx.lookup("jmx/HAService");
assertEquals("Hello", remote.hello());
String nodeA = remote.getClusterNode();
assertNotNull("Got clusterNode", nodeA);
More information about the jboss-cvs-commits
mailing list