eclipse.platform.swt
eclipse.platform.swt copied to clipboard
GTK4: Test_org_eclipse_swt_widgets_Display.test_getCursorLocation test fail.
[ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation -- Time elapsed: 0.034 s <<< FAILURE!
2025-09-08T15:17:38.7892350Z org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
2025-09-08T15:17:38.7893620Z at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
2025-09-08T15:17:38.7894948Z at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
2025-09-08T15:17:38.7896128Z at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
2025-09-08T15:17:38.7897078Z at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
2025-09-08T15:17:38.7897970Z at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
2025-09-08T15:17:38.7898873Z at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
2025-09-08T15:17:38.7900226Z at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation(Test_org_eclipse_swt_widgets_Display.java:345)
2025-09-08T15:17:38.7901601Z at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-09-08T15:17:38.7902705Z at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
2025-09-08T15:17:38.7903567Z at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
This test passes fine on my environment:
Software Information:
- Firmware Version: edk2-20221207gitfff6d81270b5-9.el9_2
- OS Name: Red Hat Enterprise Linux 10.0 (Coughlan)
- OS Build: (null)
- OS Type: 64-bit
- GNOME Version: 47
- Windowing System: Wayland
- Kernel Version: Linux 6.12.0-55.9.1.el10_0.x86_64
Theme: Default
Test Result:
The machine is a fresh install there are no special theming or any graphics related applications installed. Except some bitmap image support packages and webkit. I think build machine lacks some packages/some OS configuration.
@raghucssit I think one should enhance the test to at least mention the actual values in the message.
We install the following packages: https://github.com/eclipse-platform/eclipse.platform.swt/blob/508ad4a15bb54e280b1727db2f4dd5bd3fc4ba17/.github/workflows/maven.yml#L47-L51
@raghucssit I think one should enhance the test to at least mention the actual values in the message.
We install the following packages:
eclipse.platform.swt/.github/workflows/maven.yml
Lines 47 to 51 in 508ad4a - name: Install Linux requirements if: ${{ matrix.config.native == 'gtk.linux.x86_64'}} run: | sudo apt-get update -qq
sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver
I will improve assert error message.
ERROR] Tests run: 63, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 16.56 s <<< FAILURE! -- in org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display
2025-09-15T12:16:35.2100017Z [ERROR] org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_getCursorLocation -- Time elapsed: 0.059 s <<< FAILURE!
2025-09-15T12:16:35.2102084Z org.opentest4j.AssertionFailedError: Display's cursor location x co-ordinate should be positive. But it is: -1 ==> expected: <true> but was: <false>
It returns negative cursor location