Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 89834 Details for
Bug 219069
PersistenceTest unit tests are failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch improving error reporting for event loop exceptions
bug219069_junitEventLoopReporting.diff.txt (text/plain), 1.64 KB, created by
Martin Oberhuber
on 2008-02-15 07:33:47 EST
(
hide
)
Description:
Patch improving error reporting for event loop exceptions
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2008-02-15 07:33:47 EST
Size:
1.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.tests >Index: src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java,v >retrieving revision 1.17 >diff -u -r1.17 TestSubsystemTestCase.java >--- src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java 15 Feb 2008 07:50:56 -0000 1.17 >+++ src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java 15 Feb 2008 12:32:21 -0000 >@@ -15,6 +15,8 @@ > > import java.util.Vector; > >+import junit.framework.AssertionFailedError; >+ > import org.eclipse.jface.viewers.AbstractTreeViewer; > import org.eclipse.rse.core.RSECorePlugin; > import org.eclipse.rse.core.events.ISystemResourceChangeEvents; >@@ -203,8 +205,15 @@ > RSEWaitAndDispatchUtil.waitAndDispatch(10000); > } > catch (Exception e) { >- e.printStackTrace(); >- assertNull(e.getMessage(), e); >+ //We cannot have the Exception forwarded to the test framework, because >+ //it happens in the dispatch thread and our Runnable.run() method does >+ //not allow checked exceptions. Therefore, convert the exception into >+ //an Error that the test framework can handle, but make sure that the >+ //cause of the Error (the original exception) is maintained by calling >+ //initCause(). This will allow seeing it in the JUnit runner later on. >+ Error err = new AssertionFailedError("Unhandled event loop exception"); >+ err.initCause(e); >+ throw err; > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219069
: 89834