RFR: 8356687: [TestBug] SWT tests do not run on macOS
Andy Goryachev
angorya at openjdk.org
Tue Sep 9 16:43:53 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.
1 reviewer should be enough (thanks Kevin!)
but just in case, the code changes look good (I did not run the build).
-------------
Marked as reviewed by angorya (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/1888#pullrequestreview-3202437369
More information about the openjfx-dev
mailing list