RFR: 8356687: [TestBug] SWT tests do not run on macOS
Kevin Rushforth
kcr at openjdk.org
Tue Sep 9 16:38:50 UTC 2025
On Tue, 9 Sep 2025 10:30:12 GMT, Jayathirth D V <jdv at openjdk.org> wrote:
> We have enabled swt tests under [JDK-8169285](https://bugs.openjdk.org/browse/JDK-8169285) but they were disabled on macOS as they throw below exception :
>
>
> FXCanvasScaledTest STANDARD_OUT
> ***WARNING: Display must be created on main thread due to Cocoa restrictions. Use vmarg -XstartOnFirstThread
>
> FXCanvasScaledTest > initializationError FAILED
> org.eclipse.swt.SWTException: Invalid thread access
>
>
> Using `-XstartOnFirstThread` flag in gradle was not reliable and the issue was tracked under https://issues.gradle.org/browse/GRADLE-3290 and later under https://github.com/gradle/gradle/issues/864. This gradle issue is resolved and we can use `-XstartOnFirstThread` and enable SWT tests on macOS.
>
> With `-XstartOnFirstThread`, SWT tests run fine on macOS.
LGTM. I verified that the SWT tests fail on macOS before the fix and pass after the fix.
-------------
Marked as reviewed by kcr (Lead).
PR Review: https://git.openjdk.org/jfx/pull/1888#pullrequestreview-3202423502
More information about the openjfx-dev
mailing list