commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SCXML-91) Test case bugs
Date Tue, 25 Nov 2008 20:21:44 GMT

     [ https://issues.apache.org/jira/browse/SCXML-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rahul Akolkar updated SCXML-91:
-------------------------------

    Fix Version/s: 0.10

You've mentioned three separable items, and I will respond in order:

1) As mentioned on the dev list, we should fix the bit about catching exceptions only when
expected for the particular test. I'm setting a fix version of v0.10 on this issue for that.

2) Regarding the System.err error reporting, especially for serialization failures, I contend
that its doing its job. It is not a fatal error from the PoV of library code, its more like
a configuration error if serialization is needed. The purpose is to draw attention of the
person running the build by spewing to console, which it does well I think.

3) The testing output is desired (more in SCXML-92 later) and the stack traces are unavoidable.
Some time ago, Commons introduced code in various places that both logs an exception and rethrows
it. We now know that it is not the best practice, but ofcourse legacy persists until someone
does something about it. Here is a pointer to the particular traces we see in the Commons
SCXML build (in this case, they are from Commons Digester):

  http://commons.apache.org/digester/xref/org/apache/commons/digester/Digester.html#1455

(above URL may become outdated over time since it refers to a line number in source code)


> Test case bugs
> --------------
>
>                 Key: SCXML-91
>                 URL: https://issues.apache.org/jira/browse/SCXML-91
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.9
>            Reporter: Sebb
>             Fix For: 0.10
>
>
> Test cases are difficult to debug if they fail.
> This is because many test cases catch Exception, and don't report it fully.
> Test cases should only catch a (specific) Exception if the test is expected to generate
one, and should otherwise throw the Exception.
> Several test cases report problems to System.out or System.err and carry on processing.
> For example, serialisation errors are largely ignored, and SCXMLTestHelper#testExecutorSerializability()
ignores IO errors.
> Testing generates a lot of output, some of which appears to be errors (e.g. stack traces)
yet the test passes.
> Ideally tests should suppress output stack traces which are expected during testing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message