Skip to content

Commit

Permalink
[test] DialogCheck: reuse VerifyDialog
Browse files Browse the repository at this point in the history
to reduce used OS handles
try to avoid "org.eclipse.swt.SWTError: No more handles" during tests
  • Loading branch information
EcljpseB0T committed Oct 7, 2024
1 parent 7b0f776 commit a44b3a9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ public static void assertDialogTexts(Dialog dialog) {
public static Shell getShell() {
Shell shell = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell();
_verifyDialog = new VerifyDialog(shell);
_verifyDialog.create();
if (_verifyDialog == null) {
_verifyDialog = new VerifyDialog(shell);
_verifyDialog.create();
}
return _verifyDialog.getShell();
}

Expand Down

0 comments on commit a44b3a9

Please sign in to comment.