mx4j/src/test/test/javax/management/remote/rmi RMIIIOPConnectorTest.java,1.7,1.8
Simone Bordet <[email protected]> Sat, 14 May 2005 10:18:21 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/test/test/javax/management/remote/rmi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29452/src/test/test/javax/management/remote/rmi
Modified Files:
RMIIIOPConnectorTest.java
Log Message:
Added test for invalid ORB passed in environment Map
Index: RMIIIOPConnectorTest.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/test/test/javax/management/remote/rmi/RMIIIOPConnectorTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RMIIIOPConnectorTest.java 13 Nov 2004 16:38:58 -0000 1.7
--- RMIIIOPConnectorTest.java 14 May 2005 10:18:19 -0000 1.8
***************
*** 12,15 ****
--- 12,19 ----
import java.util.HashMap;
import java.util.Map;
+
+ import javax.management.remote.JMXConnectorFactory;
+ import javax.management.remote.JMXConnectorServer;
+ import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
***************
*** 61,63 ****
--- 65,94 ----
return env;
}
+
+ public void testInvalidProvidedORB() throws Exception
+ {
+ Map environment = new HashMap();
+ environment.put("java.naming.corba.orb", new Object());
+
+ JMXServiceURL url = new JMXServiceURL("iiop", null, 0, "/jndi/iiop://localhost:" + getNamingPort() + "/jmx");
+ JMXConnectorServer connectorServer = null;
+ try
+ {
+ startNaming();
+
+ connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, newMBeanServer());
+ connectorServer.start();
+
+ JMXConnectorFactory.connect(url, environment);
+ fail();
+ }
+ catch (IllegalArgumentException ignored)
+ {
+ }
+ finally
+ {
+ if (connectorServer != null) connectorServer.stop();
+ stopNaming();
+ }
+ }
}
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click