### 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; } } }