Update of /cvsroot/mx4j/mx4j/src/test/test/javax/management/remote
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv319
Modified Files:
JMXConnectorTestCase.java
Log Message:
Fixed the test case to avoid throwing of NoSuchObjectException
Index: JMXConnectorTestCase.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/test/test/javax/management/remote/JMXConnectorTestCase.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** JMXConnectorTestCase.java 25 Feb 2004 13:42:34 -0000 1.14
--- JMXConnectorTestCase.java 25 Feb 2004 17:00:25 -0000 1.15
***************
*** 185,213 ****
public void testStopServerBeforeClosingClient() throws Exception
{
! JMXConnectorServer cntorServer = null;
! JMXConnector cntor = null;
! try
! {
! JMXServiceURL url = createJMXConnectorServerAddress();
! cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, getEnvironment(), newMBeanServer());
! cntorServer.start();
! cntor = JMXConnectorFactory.connect(cntorServer.getAddress(), getEnvironment());
! MBeanServerConnection mbsc = cntor.getMBeanServerConnection();
! cntorServer.stop();
! try
! {
! mbsc.getDefaultDomain();
! fail();
! }
! catch (IOException x)
! {
! }
}
! finally
{
- if (cntor != null) cntor.close();
}
}
--- 185,204 ----
public void testStopServerBeforeClosingClient() throws Exception
{
! JMXServiceURL url = createJMXConnectorServerAddress();
! JMXConnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, getEnvironment(), newMBeanServer());
! cntorServer.start();
! JMXConnector cntor = JMXConnectorFactory.connect(cntorServer.getAddress(), getEnvironment());
! MBeanServerConnection mbsc = cntor.getMBeanServerConnection();
! cntorServer.stop();
! try
! {
! mbsc.getDefaultDomain();
! fail();
}
! catch (IOException x)
{
}
}
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.