In my test scenario, I'm starting up an RCP application, in which I open another workbench. In that workbench, I open a Dialog in which I open a second dialog.
Now, one of my tests verifies the caption of that last dialog with a: ui.wait(new ShellShowingCondition ...
The caption was wrong, which leads to an exception after a while... but it also leads to the other shells being closed and this famous 'Widget disposed too early':
- Code: Select all
!ENTRY com.instantiations.eclipse 1 0 2008-03-11 14:54:49.099
!MESSAGE closing shell [aysnc] Setup
!ENTRY com.instantiations.eclipse 1 0 2008-03-11 14:54:49.146
!MESSAGE closing shell [aysnc] Setup Tags
!ENTRY com.instantiations.eclipse 1 0 2008-03-11 14:54:49.662
!MESSAGE closing shell [aysnc] Edit Data Center
!ENTRY com.instantiations.eclipse 1 0 2008-03-11 14:54:50.162
!MESSAGE closing shell [aysnc] Capacity and Change Manager
!ENTRY org.eclipse.ui.workbench 4 0 2008-03-11 14:54:51.052
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:169)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:116)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
The application under test is going totally down, but junit seems to continue.
And that I can't understand. I thought I could close the dialogs nicely in a tearDown and continue the other test steps.
Running Eclipse 3.3.1.1 w. WindowTesterPro 2.3.1 on Windows XP
Any ideas ?