> This is a fix for an intermittent test failure affecting 
> `test.javafx.scene.layout.RegionCSSTest`. This turns out to be a test bug in 
> `test.javafx.scene.CssStyleHelperTest`, which was added as part of 
> [JDK-8237469](https://bugs.openjdk.java.net/browse/JDK-8237469). 
> RegionCSSTest is a victim of this bug.
> 
> Except for the systemTests project, all unit tests are run in the same JVM, 
> so each test class must ensure that any modified global state is restored 
> after the tests are run. The CssStyleHelperTest leaves a userAgentStyleSheet 
> set, which is a global (per Application) attribute, so any subsequent tests 
> will be run with that stylesheet set. If the last test that is run in 
> CssStyleHelperTest sets a style sheet with `"-fx-background"` then it will 
> cause assertion failures in 78 of the tests in RegionCSSTest. 
> 
> The fix is to cleanup the global userAgentStyleSheet, along with any other 
> state that is set, in an  `@AfterClass` cleanup method.

The pull request has been updated with 1 additional commit.

-------------

Added commits:
 - 8423f5b8: Rename initStyleManager to resetStyleManager to better reflect 
intent

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/124/files
  - new: https://git.openjdk.java.net/jfx/pull/124/files/d6dcd6bf..8423f5b8

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/124/webrev.01
 - incr: https://webrevs.openjdk.java.net/jfx/124/webrev.00-01

  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jfx/pull/124.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/124/head:pull/124

PR: https://git.openjdk.java.net/jfx/pull/124

Reply via email to