JDK-4875880 : RegTest-cte CTE_REGTEST/Generic/4273333/TestPrint.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1_19,1.4.2,5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2003-06-09
  • Updated: 2014-02-12
  • Resolved: 2014-02-12
Related Reports
Relates :  
Description
Name: iaR10016			Date: 06/09/2003


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.4.2-b25, JDK1.4.2-b24, JDK1.5.0-b07, JDK1.4.1-b21
Testbase       : RegTest-cte
Platform[s]    : Windows 2000 Pro
                  (the test is valid for Windows systems only)
switch/Mode    : -server
Falling test[s]: CTE_REGTEST/Generic/4273333/TestPrint.java

RegTest-cte CTE_REGTEST/Generic/4273333/TestPrint.java test fails three times from five
approximatelly with JDK1.4.2, JDK1.5.0, JDK1.4.1 on Windows 2000 Pro.

It seems like the test incorrectly works with Robot: if I run the test manually it
always passes.

Test source location:
=====================
/net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST/Generic/4273333/TestPrint.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b24/regtest/win32/win2000_-server_smp_linux-2/workDir/cte/CTE_REGTEST/Generic/4273333/TestPrint.jtr

How to reproduce:
=================
Run the following script (you may need to change it's variables)

--- script start ---
#!/bin/sh

JT_HOME="h:/java/jct"
JAVA_HOME="h:/java/jdk1.4.2/win32"
TEST_BASE_PATH="h:/java/regtest/cte"
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
TESTWITH=$JAVA_HOME
TESTJAVA=$JAVA_HOME
JTOPTS="-server"
TESTVMOPTS="-server"

CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar;$JT_HOME/jemmy/jemmy.jar"

mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
#rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
cd $WORK_DIR/scratch

$JAVA_HOME/bin/java -cp $CLASSPATH $JTOPTS -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,PATH=${SHELL%/*},CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-2" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/CTE_REGTEST/Generic/4273333/TestPrint.java"
--- script end ---

Test output (jtr part):
=======================
----------System.out:(18/2208)----------
Trace:
Start to wait frame "Any javax.swing.JFrame" opened
Trace:
Frame "Any javax.swing.JFrame" has been opened in 10 milliseconds

javax.swing.JFrame[frame0,0,0,400x200,layout=java.awt.BorderLayout,title=FocusProblem,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,4,23,392x173,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=1409,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
Trace:
Start to wait frame "Any javax.swing.JFrame" opened
Trace:
Frame "Any javax.swing.JFrame" has been opened in 0 milliseconds

javax.swing.JFrame[frame0,0,0,400x200,layout=java.awt.BorderLayout,title=FocusProblem,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,4,23,392x173,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=1409,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
Trace:
Start to wait action "Wait AbstractButton with text "Print Out" loaded"
Trace:
"Wait AbstractButton with text "Print Out" loaded" action has been produced in 10 milliseconds with result
     : 
javax.swing.JButton[,0,147,392x26,layout=javax.swing.OverlayLayout,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@c5aa00,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Print 
Out,defaultCapable=true]
Push button

:javax.swing.JButton[,0,147,392x26,layout=javax.swing.OverlayLayout,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@c5aa00,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Print 
Out,defaultCapable=true]
Test Failed
----------System.err:(13/686)----------
java.lang.RuntimeException: Failed
     at Test4273333.main(Test4273333.java:101)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
     at java.lang.Thread.run(Thread.java:534)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Failed
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Failed

test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Failed

Specific machine info:
======================
Hostname: linux-2
OS: Windows 2000 Pro

======================================================================
Please note addition of 1.3.1_19 SR.
The reason for this intermittent test behaviour really needs to be root caused.

Comments
testcase introduced via awt fix. Reassigning to that component
16-07-2013

EVALUATION 4273333 was re-fixed in Mantis as 4785920. Since the test always passes when run manually, but fails when using Robot, it may be a problem with the test itself. ###@###.### 2003-06-09 Can not reproduce with 1.4.2 b28 on Win200 pro. Though can not reproduce with Win2000 pro on 10 runs with 1.5.0 b26, added more delay in the testcase. Test should pass. Also check whether a printer is installed in that machine. Native print confirmation window should popup. ###@###.### 2003-11-03
03-11-2003