From: SourceForge.net <no...@so...> - 2009-11-16 17:52:57
|
Feature Requests item #1542845, was opened at 2006-08-18 16:13 Message generated for change (Comment added) made by dsaff You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1542845&group_id=15278 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: TOF (dash-13) Assigned to: David Saff (dsaff) Summary: Fix excecptions breaking the listners Initial Comment: As described in feature request 1539242, exceptions that throw themselfes on any of their methods .getMessage(), and .printStackTrace() will break the operation of many listners, e. g. the org.junit.internal.runners.TextListener. When trying to report the failures, these Listners usually pass the resulting exception up into RunNotifier.SafeNotifier, resulting where this is interpreted as a failure of the listner, not a problem of the application under test. As a result, these listners get removed, eventually leaving the notifier with nothing to report to, and effectivly muting the output of junit, depriving the user of any hint to the cause. The fix provided adresses this in two ways: 1.) The methods of Failure.class are enhanced, to protect the framework against rogue exceptions. This will help for listners, that use the methods Failure.getMessage() and Failure.getTrace(). Others extracting the Exception and treating it themselfes are still on their own. 2.) RunNotifier.SafeNotifier is changed to throw a RuntimeException the momenent the last surviving Listner is removed, thus giving the programer a starting point to untangle the mess. The Fix also adds a unit test class for Failure.class, and a test in TestListnerTest for 2.) Regards Thomas ---------------------------------------------------------------------- Comment By: David Saff (dsaff) Date: 2009-11-16 12:52 Message: This tracker is being shut down. Please move this item to http://github.com/KentBeck/junit/issues ---------------------------------------------------------------------- Comment By: David Saff (dsaff) Date: 2006-10-17 11:59 Message: Logged In: YES user_id=325156 These seem reasonable. I'll look further. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365278&aid=1542845&group_id=15278 |