Skip to content

Do not beep in the Display syncExec and asyncExec tests - #3741

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:quiet-display-tests
Oct 17, 2026
Merged

vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:quiet-display-tests

Conversation

@vogella

@vogella vogella commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

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().

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 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 1 017 files  ±0   1 017 suites  ±0   1h 15m 38s ⏱️ + 1m 5s
 5 057 tests ±0   5 029 ✅ ±0     28 💤 ±0  0 ❌ ±0 
29 707 runs  ±0  27 175 ✅ ±0  2 532 💤 ±0  0 ❌ ±0 

Results for commit a966027. ± Comparison against base commit 8376e00.

@vogella
vogella merged commit 3af6685 into eclipse-platform:master Oct 17, 2026
22 checks passed
@vogella
vogella deleted the quiet-display-tests branch October 17, 2026 19:23
final Display display = new Display();
try {
display.asyncExec(() -> display.beep());
display.asyncExec(() -> {});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3745 restores the check without the annoying beep and it also adds the check that the runnable actually runs, which was not tested before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants