-
Bug
-
Resolution: Fixed
-
P4
-
jfx23
-
b01
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8336789 | jfx23.0.1 | Marius Hanl | P4 | Resolved | Fixed | b01 |
JDK-8336326 | jfx23 | Marius Hanl | P4 | Resolved | Fixed | b27 |
After the fix for JDK-8326619, we started seeing test failures on Ubuntu 22.04 LTS during our nightly headful test run.
To reproduce, run the following on Ubuntu 22.04 LTS (also happens on an older 16.04 system) :
$ gradle --info -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests SizeToSceneTest
SizeToSceneTest > testInitialSizeOnSizeToSceneThenFullscreen() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeOnSizeToSceneThenFullscreen(SizeToSceneTest.java:152)
SizeToSceneTest > testInitialSizeAfterShowFullscreenThenSizeToScene() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowFullscreenThenSizeToScene(SizeToSceneTest.java:188)
SizeToSceneTest > testInitialSizeAfterShowSizeToSceneThenFullscreen() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowSizeToSceneThenFullscreen(SizeToSceneTest.java:164)
SizeToSceneTest > testInitialSizeOnFullscreenThenSizeToScene() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeOnFullscreenThenSizeToScene(SizeToSceneTest.java:130)
I tracked this down to a bad assumption that the test makes: namely, that full screen windows will always be within the visual bounds. It is possible (and common on some platforms) for a full screen window to cover the entire screen bounds, not just the visible bounds.
While looking into this, I also noticed that the expected and actual arguments to assertEquals are backwards, which makes the error message confusing. In reality the test is expecting the width to be 1011 (the width of the visual bounds) while the actual is 1117. This should be fixed at the same time by swapping the arguments (for all of the tests in that class, not just the full screen tests).
To reproduce, run the following on Ubuntu 22.04 LTS (also happens on an older 16.04 system) :
$ gradle --info -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests SizeToSceneTest
SizeToSceneTest > testInitialSizeOnSizeToSceneThenFullscreen() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeOnSizeToSceneThenFullscreen(SizeToSceneTest.java:152)
SizeToSceneTest > testInitialSizeAfterShowFullscreenThenSizeToScene() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowFullscreenThenSizeToScene(SizeToSceneTest.java:188)
SizeToSceneTest > testInitialSizeAfterShowSizeToSceneThenFullscreen() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowSizeToSceneThenFullscreen(SizeToSceneTest.java:164)
SizeToSceneTest > testInitialSizeOnFullscreenThenSizeToScene() FAILED
org.opentest4j.AssertionFailedError: expected: <1920.0> but was: <1855.0>
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:86)
at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:81)
at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1010)
at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:77)
at app//test.javafx.stage.SizeToSceneTest.testInitialSizeOnFullscreenThenSizeToScene(SizeToSceneTest.java:130)
I tracked this down to a bad assumption that the test makes: namely, that full screen windows will always be within the visual bounds. It is possible (and common on some platforms) for a full screen window to cover the entire screen bounds, not just the visible bounds.
While looking into this, I also noticed that the expected and actual arguments to assertEquals are backwards, which makes the error message confusing. In reality the test is expecting the width to be 1011 (the width of the visual bounds) while the actual is 1117. This should be fixed at the same time by swapping the arguments (for all of the tests in that class, not just the full screen tests).
- backported by
-
JDK-8336326 SizeToSceneTest: fullScreen tests fail on Ubuntu 22.04
- Resolved
-
JDK-8336789 SizeToSceneTest: fullScreen tests fail on Ubuntu 22.04
- Resolved
- relates to
-
JDK-8326619 Stage.sizeToScene() on maximized/fullscreen Stage breaks the Window
- Resolved
- links to
-
Commit(jfx23) openjdk/jfx/e89443de
-
Commit(master) openjdk/jfx/e3c15957
-
Review(jfx23) openjdk/jfx/1504
-
Review(master) openjdk/jfx/1501
(2 links to)