[jboss-jira] [JBoss JIRA] Commented: (JBPM-1045) test suite has to trow a runtime exception on error so meaningful report is generated

Aleksandar Kostadinov (JIRA) jira-events at lists.jboss.org
Wed Aug 22 15:04:18 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPM-1045?page=comments#action_12373378 ] 
            
Aleksandar Kostadinov commented on JBPM-1045:
---------------------------------------------

--- AllTests    2007-08-22 14:50:04.713887000 -0400
+++ AllTests.java       2007-08-22 14:57:25.335824000 -0400
@@ -36,7 +36,8 @@
       return suite;
     } catch (Throwable t) {
       t.printStackTrace();
-      return null;
+      throw new RuntimeException(t);
+      // return null;
     }
   }
 }

--- AllDbTests  2007-08-22 15:02:04.809038000 -0400
+++ AllDbTests.java     2007-08-21 10:18:22.329696000 -0400
@@ -84,6 +84,7 @@

     } catch (Throwable t) {
       t.printStackTrace();
+      throw new RuntimeException(t);
     }

Let me not give blind suggestions about both the other 2 files. Haven't looked into do code. These are lower priority.

> test suite has to trow a runtime exception on error so meaningful report is generated
> -------------------------------------------------------------------------------------
>
>                 Key: JBPM-1045
>                 URL: http://jira.jboss.com/jira/browse/JBPM-1045
>             Project: JBoss jBPM
>          Issue Type: Bug
>    Affects Versions: jBPM jPDL 3.2.2
>            Reporter: Aleksandar Kostadinov
>         Assigned To: Tom Baeyens
>
> When there are test suite initialization problems, test suite ignores exception (just prints it to the output) that causes junit to crash. 
> I identified the issue in the following files:
> jpdl/jar/src/test/java/org/jbpm/AllDBTests.java
> jpdl/jar/src/test/java/org/jbpm/AllTests.java
> have to have "throw t;" after "t.printStackTrace();"
> As well the following test cases seem suspicious to me. I mean I'm not sure if an exception by these tests will cause a test suite crash. Please inspect if trowing an axception is desirable after printStackTrace method is used in these files:
> ./msg/command/AsyncExecutionDbTest.java
> ./perf/MemLeakTest.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list