Skip to content

Conversation

raghucssit
Copy link
Contributor

@raghucssit raghucssit commented Sep 11, 2025

As content copy/paste works well manually junit fails because junit checks the text content well before it is updated by GTK. So it is a timing delay. Processing all the pending events make sure text is updated(Either by introducing some delay in junit or really processing any pending UI updates).

see #2491

Copy link
Contributor

github-actions bot commented Sep 11, 2025

Test Results

   409 files   -   137     409 suites   - 137   24m 47s ⏱️ - 9m 25s
 4 394 tests  -    37   4 379 ✅  -    35   15 💤  -  2  0 ❌ ±0 
12 635 runs   - 4 129  12 525 ✅  - 4 112  110 💤  - 17  0 ❌ ±0 

Results for commit 29c913b. ± Comparison against base commit 9164303.

This pull request removes 37 tests.
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_dollarSign
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_emptyString
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letterA
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16LE_null
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_AsciiLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_Asciiletter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_LotsOfLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letters
…

♻️ This comment has been updated with latest results.

@iloveeclipse iloveeclipse added the gtk4 GTK4 issues label Sep 11, 2025
@iloveeclipse
Copy link
Member

Please add a remark on Text.copy() similar to what you did on #2489

@raghucssit raghucssit changed the title Spin event loop to process pending UI updates before checking the pasted Spin event loop to process pending UI updates before checking the pasted content on the Text. Sep 11, 2025
@raghucssit
Copy link
Contributor Author

Please add a remark on Text.copy() similar to what you did on #2489

Fixed.. I will check the test results once the build is completed.

@raghucssit
Copy link
Contributor Author

This PR has fixed the copy test..
Other 3 tests are still failing.. so this PR is good to merge..

2025-09-11T13:50:13.5991830Z [ERROR] Tests run: 133, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 14.03 s <<< FAILURE! -- in org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text
2025-09-11T13:50:13.5993393Z [ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_consistency_Segments -- Time elapsed: 0.473 s <<< FAILURE!
2025-09-11T13:50:13.5994428Z java.lang.AssertionError: expected:<true> but was:<false>
2025-09-11T13:50:13.5995017Z 	at org.junit.Assert.fail(Assert.java:89)
2025-09-11T13:50:13.5995545Z 	at org.junit.Assert.failNotEquals(Assert.java:835)
2025-09-11T13:50:13.5996127Z 	at org.junit.Assert.assertEquals(Assert.java:120)
2025-09-11T13:50:13.5996684Z 	at org.junit.Assert.assertEquals(Assert.java:146)
2025-09-11T13:50:13.5997695Z 	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.doSegmentsTest(Test_org_eclipse_swt_widgets_Text.java:1508)
2025-09-11T13:50:13.5999281Z 	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_consistency_Segments(Test_org_eclipse_swt_widgets_Text.java:1458)
2025-09-11T13:50:13.6000352Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-09-11T13:50:13.6001517Z 	Suppressed: java.lang.Throwable: Screenshot written to /tmp/org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_consistency_Segments.png
2025-09-11T13:50:13.6002795Z 		at org.eclipse.test.Screenshots$ScreenshotOnFailure.failed(Screenshots.java:41)
2025-09-11T13:50:13.6003327Z 
2025-09-11T13:50:13.6004049Z [ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setFontLorg_eclipse_swt_graphics_Font -- Time elapsed: 0.478 s <<< FAILURE!
2025-09-11T13:50:13.6005377Z java.lang.AssertionError
2025-09-11T13:50:13.6005791Z 	at org.junit.Assert.fail(Assert.java:87)
2025-09-11T13:50:13.6006306Z 	at org.junit.Assert.assertTrue(Assert.java:42)
2025-09-11T13:50:13.6006821Z 	at org.junit.Assert.assertTrue(Assert.java:53)
2025-09-11T13:50:13.6007864Z 	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setFontLorg_eclipse_swt_graphics_Font(Test_org_eclipse_swt_widgets_Text.java:1103)
2025-09-11T13:50:13.6009201Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-09-11T13:50:13.6010461Z 	Suppressed: java.lang.Throwable: Screenshot written to /tmp/org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setFontLorg_eclipse_swt_graphics_Font.png
2025-09-11T13:50:13.6011844Z 		at org.eclipse.test.Screenshots$ScreenshotOnFailure.failed(Screenshots.java:41)
2025-09-11T13:50:13.6012374Z 
2025-09-11T13:50:13.6012913Z [ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_paste -- Time elapsed: 0.489 s <<< FAILURE!
2025-09-11T13:50:13.6013971Z org.junit.ComparisonFailure: expected:<[23]01234567890> but was:<[]01234567890>
2025-09-11T13:50:13.6014679Z 	at org.junit.Assert.assertEquals(Assert.java:117)
2025-09-11T13:50:13.6015231Z 	at org.junit.Assert.assertEquals(Assert.java:146)
2025-09-11T13:50:13.6016115Z 	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_paste(Test_org_eclipse_swt_widgets_Text.java:948)
2025-09-11T13:50:13.6017082Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-09-11T13:50:13.6018169Z 	Suppressed: java.lang.Throwable: Screenshot written to /tmp/org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_paste.png
2025-09-11T13:50:13.6019738Z 		at org.eclipse.test.Screenshots$ScreenshotOnFailure.failed(Screenshots.java:41)

@raghucssit raghucssit force-pushed the text_copy_test branch 2 times, most recently from 63ae609 to ba57aa2 Compare September 12, 2025 08:17
content on the Text.

As content copy/paste works well manually junit fails because junit
checks the text content well before it is updated by GTK. So it is a
timing delay. Processing all the pending events make sure text is
updated(Either by introducing some delay in junit or really processing
any pending UI updates).

see eclipse-platform#2491
@iloveeclipse iloveeclipse merged commit 508ad4a into eclipse-platform:master Sep 12, 2025
24 of 27 checks passed
@iloveeclipse
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gtk4 GTK4 issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants