View | Details | Raw Unified | Return to bug 219069
Collapse All | Expand All

(-)src/org/eclipse/rse/tests/subsystems/testsubsystem/TestSubsystemTestCase.java (-2 / +11 lines)
Lines 15-20 Link Here
15
15
16
import java.util.Vector;
16
import java.util.Vector;
17
17
18
import junit.framework.AssertionFailedError;
19
18
import org.eclipse.jface.viewers.AbstractTreeViewer;
20
import org.eclipse.jface.viewers.AbstractTreeViewer;
19
import org.eclipse.rse.core.RSECorePlugin;
21
import org.eclipse.rse.core.RSECorePlugin;
20
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
22
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
Lines 203-210 Link Here
203
			RSEWaitAndDispatchUtil.waitAndDispatch(10000);
205
			RSEWaitAndDispatchUtil.waitAndDispatch(10000);
204
		}
206
		}
205
		catch (Exception e) {
207
		catch (Exception e) {
206
			e.printStackTrace();
208
			//We cannot have the Exception forwarded to the test framework, because
207
			assertNull(e.getMessage(), e);
209
			//it happens in the dispatch thread and our Runnable.run() method does
210
			//not allow checked exceptions. Therefore, convert the exception into
211
			//an Error that the test framework can handle, but make sure that the
212
			//cause of the Error (the original exception) is maintained by calling
213
			//initCause(). This will allow seeing it in the JUnit runner later on.
214
			Error err = new AssertionFailedError("Unhandled event loop exception");
215
			err.initCause(e);  
216
			throw err;
208
		}
217
		}
209
	}
218
	}
210
}
219
}

Return to bug 219069