Skip to content

Commit a44b3a9

Browse files
committed
[test] DialogCheck: reuse VerifyDialog
to reduce used OS handles try to avoid "org.eclipse.swt.SWTError: No more handles" during tests
1 parent 7b0f776 commit a44b3a9

File tree

1 file changed

+4
-2
lines changed
  • tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util

1 file changed

+4
-2
lines changed

tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ public static void assertDialogTexts(Dialog dialog) {
104104
public static Shell getShell() {
105105
Shell shell = PlatformUI.getWorkbench()
106106
.getActiveWorkbenchWindow().getShell();
107-
_verifyDialog = new VerifyDialog(shell);
108-
_verifyDialog.create();
107+
if (_verifyDialog == null) {
108+
_verifyDialog = new VerifyDialog(shell);
109+
_verifyDialog.create();
110+
}
109111
return _verifyDialog.getShell();
110112
}
111113

0 commit comments

Comments
 (0)