Skip to content

Improve stability of Text cut/copy/paste tests on Windows#3081

Open
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
vi-eclipse:issue-106
Open

Improve stability of Text cut/copy/paste tests on Windows#3081
HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
vi-eclipse:issue-106

Conversation

@HeikoKlare
Copy link
Contributor

The tests for cut/copy/paste functionality of Text widgets in Test_org_eclipse_swt_widgets_Text sporadically fail on Windows. Locally, they fail on almost every execution (for me). This seems to either be caused by some timing issue at the OS or by the need to spin the event queue for processing the cut/copy/paste operations at the OS.

In some tests, according event processing for spinning the event loop and waiting for events have been implemented already for GTK. This change adapts all calls to text.cut()/copy()/paste() such that the event queue is spinned. For me, it fixes all local test failures of that test class.

This fix attempt was triggered by the according tests spordically but frequently failing in I-Build test execution, such as:
https://download.eclipse.org/eclipse/downloads/drops4/I20260213-1800/testresults/html/org.eclipse.swt.tests_ep439I-unit-win32-x86_64-java21_win32.win32.x86_64_21.html

Fixes #106

Fixes #876

The tests for cut/copy/paste functionality of Text widgets in
Test_org_eclipse_swt_widgets_Text sporadically fail on Windows. Locally,
they fail on almost every execution. This seems to either be caused by
some timing issue at the OS or by the need to spin the event queue for
processing the cut/copy/paste operations at the OS.

In some tests, according event processing for spinning the event loop
and waiting for events have been implemented already for GTK. This
change adapts all calls to text.cut()/copy()/paste() such that the event
queue is spinned.

Fixes eclipse-platform#106

Fixes eclipse-platform#876
@github-actions
Copy link
Contributor

Test Results

  176 files  ±0    176 suites  ±0   27m 11s ⏱️ - 3m 14s
4 694 tests ±0  4 672 ✅ ±0  22 💤 ±0  0 ❌ ±0 
  489 runs  ±0    483 ✅ ±0   6 💤 ±0  0 ❌ ±0 

Results for commit 995f2f8. ± Comparison against base commit 588e560.

@HeikoKlare HeikoKlare marked this pull request as ready for review February 14, 2026 10:05
@HeikoKlare
Copy link
Contributor Author

@jonahgraham you have been working on the Clipboard and according tests quite heavily. What do think about this adaptation of the tests? Do you see any risk? It significantly improves (or even fix) the test behavior on Windows for me, but I would like to avoid that it, e.g., breaks something for GTK.

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

Labels

None yet

Projects

None yet

1 participant