| Summary: | [ErrorHandling] Test failures in official build: at org.eclipse.ui.tests.statushandlers.StatusDialogManagerTest.testBug276371(StatusDialogManagerTest.java:638) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | UI | Assignee: | Krzysztof Daniel <krzysztof.daniel> |
| Status: | VERIFIED FIXED | QA Contact: | Susan McCourt <susan> |
| Severity: | normal | ||
| Priority: | P3 | CC: | dj.houghton, john.arthorne, kim.moir, krzysztof.daniel, ob1.eclipse, remy.suen, tjwatson |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Dani Megert
The try/catch block with the fail(String) method needs to be deleted. The stack trace as it is tells us absolutely nothing. We should let the exception be propagated up to JUnit so that it can report the trace back in its entirety. The test was introduced to ensure that no exception during displaying status dialog will cause an endless loop of exceptions nor prevent further exceptions from displaying. To cause an exception, I have used custom IStatus which exploded when the message was get. The code in status has not changed, the exception is properly caught and then logged via WorkbenchPlugin.log(statusAdapter.getStatus()); Due to changes introduced by bug 292135, following code will fail: PlatformLogWriter. IStatus status = new Status(IStatus.ERROR, "org.eclipse.ui.tests", "bomb"){ public String getMessage() { throw new RuntimeException("the bomb!"); } }; PlatformLogWriter.getLog(status). Thomas, is this a valid test case for you? I am not sure what the correct coarse of action is here. If someone supplies a bad status we are supposed to catch the exception and let the status through the logging system without propagating the exception to the caller? John, only CC'ing you in case I am not available to fix this and it turns out to be something we need to address in common. Ok, the issue is caused by the bug in the test itself. The fake status throws exception all the time, and therefore it cannot be logged properly. I have updated the status to fail only once and therefore simulate an exception during exception handling only in status dialog. The test passes now. The question what to do with such a status during osgi logging is a separate issue. (In reply to comment #4) > Ok, the issue is caused by the bug in the test itself. The fake status throws > exception all the time, and therefore it cannot be logged properly. > > I have updated the status to fail only once and therefore simulate an exception > during exception handling only in status dialog. FYI: I've updated copyright date and bundle version in HEAD. Verified in I20110118-0800. |