Repository navigation
Do not beep in the Display syncExec and asyncExec tests - #3741
Merged
Merged
Conversation
The exec tests used Display.beep() as their runnable, which plays the system alert sound during test runs. Use a silent runnable instead, and assert that syncExec ran it. Assisted-by: multiple AI agents and layers of automated tooling 🤖
Contributor
HeikoKlare
reviewed
Oct 19, 2026
| final Display display = new Display(); | ||
| try { | ||
| display.asyncExec(() -> display.beep()); | ||
| display.asyncExec(() -> {}); |
Contributor
There was a problem hiding this comment.
Isn't the test quite useless now? It was not that reasonable before either, but it seems like it was supposed to fail with the checkDevice() call in display.beep() if asyncExec was broken, so maybe rather that should be fixed?
Contributor
Author
There was a problem hiding this comment.
I think you are right. I did not think of the checkDevice() call. I restore it or try to find a better way with a new PR.
Contributor
Author
There was a problem hiding this comment.
#3745 restores the check without the annoying beep and it also adds the check that the runnable actually runs, which was not tested before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The syncExec and asyncExec tests in Test_org_eclipse_swt_widgets_Display used Display.beep() as their runnable, so running the test suite plays the system alert sound. They now use a silent runnable, and the syncExec test asserts that the runnable actually ran, which it did not check before. test_beep keeps its single beep since it is the only coverage of Display.beep().