[jboss-cvs] JBossAS SVN: r69550 - trunk/testsuite/src/main/org/jboss/test/cluster/multicfg/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 1 17:31:16 EST 2008


Author: bstansberry at jboss.com
Date: 2008-02-01 17:31:16 -0500 (Fri, 01 Feb 2008)
New Revision: 69550

Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/multicfg/test/HAPartitionStateTransferTestCase.java
Log:
Ensure we get the right exception cause; better logging of what happens

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/multicfg/test/HAPartitionStateTransferTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/multicfg/test/HAPartitionStateTransferTestCase.java	2008-02-01 22:30:13 UTC (rev 69549)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/multicfg/test/HAPartitionStateTransferTestCase.java	2008-02-01 22:31:16 UTC (rev 69550)
@@ -75,13 +75,17 @@
       
       Throwable parent = e;
       Throwable cause = e.getCause();
-      while (cause != null)
+      while (!(parent instanceof IllegalStateException) && cause != null)
       {
          parent = cause;
          cause = parent.getCause();
       }
       
-      assertTrue("Correct type of Exception caught", parent instanceof IllegalStateException);
+      if (!(parent instanceof IllegalStateException))
+      {
+         log.info("Wrong exception type caught", parent);
+         fail(parent.getClass().getName() + " caught; should be IllegalStateException");
+      }
       
       // Confirm the bad partition is removed from the current view
       ObjectName partition = new ObjectName("jboss:service=BadProviderPartition");
@@ -101,13 +105,17 @@
       
       Throwable parent = e;
       Throwable cause = e.getCause();
-      while (cause != null)
+      while (!(parent instanceof BadHAPartitionStateException) && cause != null)
       {
          parent = cause;
          cause = parent.getCause();
       }
       
-      assertTrue("Correct type of Exception caught", parent instanceof BadHAPartitionStateException);
+      if (!(parent instanceof BadHAPartitionStateException))
+      {
+         log.info("Wrong exception type caught", parent);
+         fail(parent.getClass().getName() + " caught; should be BadHAPartitionStateException");
+      }
       
       // Confirm the bad partition is removed from the current view
       ObjectName partition = new ObjectName("jboss:service=BadStatePartition");




More information about the jboss-cvs-commits mailing list