StubToolkit breaks test
Kevin Rushforth
kevin.rushforth at oracle.com
Mon Jan 29 13:39:01 UTC 2024
Tests in the javafx.graphics module always use StubToolkit. If you want
to use the real toolkit (QuantumToolkit), you need to put the tests in
the systemTests project, under "tests/system".
-- Kevin
On 1/28/2024 3:47 PM, John Hendrikx wrote:
> I found an old disabled test that is testing PrismTextLayout for which
> I have a PR outstanding (https://github.com/openjdk/jfx/pull/1236).
>
> The test I think is useful, but is loading real fonts (Monaco and
> Tahoma). Locally this works when I don't use the StubToolkit to run
> the test, and (I presume) may also work on the various build
> environments if those fonts are part of those environments (otherwise
> the test can be disabled with a JUnit 5 Assumption for platforms that
> lack these fonts -- the test would be useful even if it ran only in
> one environment as aside from the required fonts it is not OS specific).
>
> However, in the build system, the test is run with the StubToolkit,
> which can't load real fonts (which I do really need for a proper
> test). The test therefore fails.
>
> Is there a way to mark tests to not use the StubToolkit?
>
> --John
>
More information about the openjfx-dev
mailing list