Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #30: Close the dialog if test fails
The individual checks in this class do "button.getShell().dispose();" to close the dialog when an assertion fails. That closes the UI resources, but it does not dispose the non-UI resources/references. In this particular case when UIComparePreferencesAuto.testCompareViewersPref failed, it left org.eclipse.jface.preference.PreferenceNode.page set to the now disposed General preference page. So when a later test tries to open the dialog, the test fails due to disposed widget error. By calling dialog.close() it makes sure that org.eclipse.jface.preference.PreferenceNode.disposeResources() is called, which releases the reference in PreferenceNode.page
- Loading branch information