[jboss-cvs] JBoss Messaging SVN: r3117 - trunk/tests/src/org/jboss/test/messaging/core.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 19 05:24:10 EDT 2007
Author: ataylor
Date: 2007-09-19 05:24:09 -0400 (Wed, 19 Sep 2007)
New Revision: 3117
Modified:
trunk/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java
Log:
wrapped the fail calls in the teardown() method in a try/finally. This is so the teardown code always gets called.
Modified: trunk/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java 2007-09-19 08:17:53 UTC (rev 3116)
+++ trunk/tests/src/org/jboss/test/messaging/core/PostOfficeTestBase.java 2007-09-19 09:24:09 UTC (rev 3117)
@@ -269,30 +269,37 @@
protected void tearDown() throws Exception
{
Thread.sleep(2000);
-
- pm.reapUnreferencedMessages();
-
- if (this.checkNoMessageData())
- {
- fail("Message data still exists");
- }
-
- if (this.checkNoBindingData())
- {
- fail("Binding data still exists");
- }
-
- sc.stop();
- sc = null;
-
-
- pm.stop();
- tr.stop();
- ms.stop();
- transactionIDManager.stop();
- channelIDManager.stop();
- super.tearDown();
+ try
+ {
+ pm.reapUnreferencedMessages();
+
+ if (this.checkNoMessageData())
+ {
+ fail("Message data still exists");
+ }
+
+ if (this.checkNoBindingData())
+ {
+ fail("Binding data still exists");
+ }
+ }
+ finally
+ {
+ sc.stop();
+ sc = null;
+
+
+ pm.stop();
+ tr.stop();
+ ms.stop();
+ transactionIDManager.stop();
+ channelIDManager.stop();
+
+ super.tearDown();
+ }
+
+
}
// Private -------------------------------------------------------
More information about the jboss-cvs-commits
mailing list