[jboss-cvs] JBoss Messaging SVN: r2446 - trunk/tests/src/org/jboss/test/messaging/jms/clustering.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 26 07:48:31 EST 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-02-26 07:48:31 -0500 (Mon, 26 Feb 2007)
New Revision: 2446
Modified:
trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
Log:
added one more test that fails because of http://jira.jboss.org/jira/browse/JBMESSAGING-891
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-02-26 12:24:49 UTC (rev 2445)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-02-26 12:48:31 UTC (rev 2446)
@@ -1747,13 +1747,14 @@
}
}
- public void testFailureOnClose() throws Exception
+ public void testCloseConsumer() throws Exception
{
+ Connection conn0 = null;
Connection conn1 = null;
try
{
- conn1 = cf.createConnection();
+ conn0 = cf.createConnection();
// Objects Server1
conn1 = cf.createConnection();
@@ -1778,9 +1779,81 @@
{
conn1.close();
}
+
+ if (conn0 != null)
+ {
+ conn0.close();
+ }
}
}
+ public void testCloseSession() throws Exception
+ {
+ Connection conn0 = null;
+ Connection conn1 = null;
+
+ try
+ {
+ conn0 = cf.createConnection();
+
+ conn1 = cf.createConnection();
+
+ assertEquals(1, ((JBossConnection)conn1).getServerID());
+
+ JMSRemotingConnection rc = ((ClientConnectionDelegate)((JBossConnection)conn1).
+ getDelegate()).getRemotingConnection();
+ rc.removeConnectionListener();
+
+ Session session = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ ServerManagement.killAndWait(1);
+
+ session.close();
+ }
+ finally
+ {
+ if (conn1 != null)
+ {
+ conn1.close();
+ }
+
+ if (conn0 != null)
+ {
+ conn0.close();
+ }
+ }
+ }
+
+ public void testCloseConnection() throws Exception
+ {
+ Connection conn0 = null;
+ Connection conn1 = null;
+
+ try
+ {
+ conn0 = cf.createConnection();
+
+ conn1 = cf.createConnection();
+
+ assertEquals(1, ((JBossConnection)conn1).getServerID());
+
+ JMSRemotingConnection rc = ((ClientConnectionDelegate)((JBossConnection)conn1).
+ getDelegate()).getRemotingConnection();
+ rc.removeConnectionListener();
+
+ ServerManagement.killAndWait(1);
+
+ conn1.close();
+ }
+ finally
+ {
+ if (conn0 != null)
+ {
+ conn0.close();
+ }
+ }
+ }
+
public void testMergeQueue() throws Exception
{
Connection conn0 = null;
More information about the jboss-cvs-commits
mailing list