JDK-6525573 : PrintDialogTest.ksh is failing against JDK1.5.0_12b01 but passing against JDK1.5.0_11b03
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u12
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • CPU: generic
  • Submitted: 2007-02-15
  • Updated: 2011-02-16
  • Resolved: 2007-02-27
Related Reports
Duplicate :  
Description
PrintDialogTest.ksh is failing against JDK 1.5.0_12b01 but passing against JDK 1.5.0_11b03 on Solaris and Linux systems. There is no such a failure on Windows.

Here is the list of tested OSs:

           Sol11-sparc Sol10-sparc Sol10-x86 SLES10-x86 WinXP-x86      
50u12b01   FAIL        FAIL        FAIL      FAIL       PASS   
50u11b03   PASS        PASS        PASS      PASS       PASS

The test case is attached (test.tar).

How to reproduce:

1. Install JDK on a machine.
2. Untar the test case and cd into created "test" dir.
3. sh PrintDialogTest.ksh ${WORK_DIR} ${JAVAC} ${JAVA}

The execution commands and log are below:

bash-3.00# sh PrintDialogTest.ksh . /export/JDK/jdk1.5.0_11/bin/javac /export/JDK/jdk1.5.0_11/bin/java
Test passed
bash-3.00# sh PrintDialogTest.ksh . /export/JDK/jdk1.5.0_12/bin/javac /export/JDK/jdk1.5.0_12/bin/java
Actual Color: java.awt.Color[r=238,g=238,b=238]
Expected Color: java.awt.Color[r=0,g=0,b=255]
FAIL: Frame not repainted properly
Test failed
About to screen capture - java.awt.Rectangle[x=0,y=0,width=1280,height=1024]
Execution failed

Thanks in advance.

Comments
EVALUATION After running against the build without fix of 6511568, the test passed. So, this seems to be a duplicate of 6523518.
27-02-2007

EVALUATION I was able to reproduce the problem with 1.5.0_12-b01 and found that the test fails because the print dialog doesn't close with ESC key. This looks like a duplicate of 6523518.
16-02-2007

EVALUATION After a long investigation I have found the following. The test can be minimized so Swing is not used and no threads synchronization is present - see attached SimpleTest.java. Then, the test occasionally passes or fails - this depends on where is the mouse pointer at the start of the test. This looks like a bug in XWarpPointer, when I'm running in Xnest of XVFB. However, submitter confirms that the test fails even while running in normal mode, not in Xnest. The test output shows that the color check fails, so I think this is caused either by timings and repainting or by the wrong test itself. Will try to investigate it further.
16-02-2007