Details
-
Bug
-
Resolution: Fixed
-
P4
-
7, 9, 10
-
OEL 7* but may be anywhere, Ubuntu 17.10
-
b05
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8267996 | 8u311 | Sergey Bylokhov | P4 | Resolved | Fixed | b01 |
Description
This test fails for various reasons: one of the is JDK-8158918 and another is unlucky timing with current implementation of realSync machinery. Namely, on OEL 7 (but not only, I guess) the test fails intermittently at the very beginning (see the rule below for an example of exception). This is a fix for that issue which works for me:
--- a/test/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java Wed Jun 29 14:47:58 2016 +0530
+++ b/test/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java Mon Jul 04 13:57:19 2016 +0300
@@ -51,10 +51,12 @@
static volatile int lastFrameState = Frame.NORMAL;
static volatile boolean failed = false;
static volatile Toolkit myKit;
+ static Robot robot = null;
private static void checkState(Frame f, int state) {
f.setExtendedState(state);
- Util.waitForIdle(null);
+ Util.waitForIdle(robot);
+ robot.delay(100);
System.out.println("state = " + state + "; getExtendedState() = " + f.getExtendedState());
@@ -79,7 +81,8 @@
f.setVisible(true);
}
- Util.waitForIdle(null);
+ Util.waitForIdle(robot);
+ robot.delay(100);
f.addWindowStateListener(new WindowStateListener() {
public void windowStateChanged(WindowEvent e) {
@@ -158,6 +161,11 @@
// it for now.
public static void main( String args[] ) throws InterruptedException
{
+ try {
+ robot = new Robot();
+ }catch(Exception noRobotEx){
+ noRobotEx.printStackTrace();
+ }
mainThread = Thread.currentThread();
try
{
RULE "java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java" Exception java.lang.RuntimeException: getExtendedState() != last getNewState() in WINDOW_STATE_CHANGED event.
--- a/test/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java Wed Jun 29 14:47:58 2016 +0530
+++ b/test/java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java Mon Jul 04 13:57:19 2016 +0300
@@ -51,10 +51,12 @@
static volatile int lastFrameState = Frame.NORMAL;
static volatile boolean failed = false;
static volatile Toolkit myKit;
+ static Robot robot = null;
private static void checkState(Frame f, int state) {
f.setExtendedState(state);
- Util.waitForIdle(null);
+ Util.waitForIdle(robot);
+ robot.delay(100);
System.out.println("state = " + state + "; getExtendedState() = " + f.getExtendedState());
@@ -79,7 +81,8 @@
f.setVisible(true);
}
- Util.waitForIdle(null);
+ Util.waitForIdle(robot);
+ robot.delay(100);
f.addWindowStateListener(new WindowStateListener() {
public void windowStateChanged(WindowEvent e) {
@@ -158,6 +161,11 @@
// it for now.
public static void main( String args[] ) throws InterruptedException
{
+ try {
+ robot = new Robot();
+ }catch(Exception noRobotEx){
+ noRobotEx.printStackTrace();
+ }
mainThread = Thread.currentThread();
try
{
RULE "java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java" Exception java.lang.RuntimeException: getExtendedState() != last getNewState() in WINDOW_STATE_CHANGED event.
Attachments
Issue Links
- backported by
-
JDK-8267996 [TEST_BUG] java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
-
- Resolved
-