JDK-6438691 : regression test java/awt/MouseAdapter/MouseAdapterUnitTest/MouseAdapterUnitTest.java fails in b87
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-06-14
  • Updated: 2011-01-19
  • Resolved: 2006-06-26
Related Reports
Duplicate :  
Description
Java Version: build 1.6.0-rc-b87
Platform: solaris_sparc10

Problems:
The regression test MouseAdapterUnitTest.java fails in b87, the exceptions as followings:
----------System.err:(14/979)----------
java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come
	at MouseAdapterUnitTest.init(MouseAdapterUnitTest.java:77)
	at MouseAdapterUnitTest.main(MouseAdapterUnitTest.java:210)
	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:589)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:83)
	at java.lang.Thread.run(Thread.java:619)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come


How to reproduce:
1. set JAVA_HOME to mustang b87
2. run the script as following:
JAVA_HOME="JAVA_HOME"

/net/cady.sfbay/export/dtf/unified/knight-ws/suites/regression/jct-tools/2.1.6/archive/fcs/binaries/solaris/bin/jtreg \
-cpa:/net/cady.sfbay/export/dtf/unified/knight-ws/suites/regression/sail16/Jemmy/jemmy.jar \
-r:./2d-reportDir \
-w:./2d-workDir \
/java/re/jdk/1.6.0/promoted/rc/b87/ws/j2se/test/java/awt/MouseAdapter/MouseAdapterUnitTest/MouseAdapterUnitTest.java

The jtr file is as followings:
#Test Results (version 2)
#Tue Jun 13 14:33:33 PDT 2006
#checksum:5c59384cd2ee8f61
#-----testdescription-----
$file=/net/jre.sfbay/p/v06/jdk/6.0/rc/b87/ws/j2se/test/java/awt/MouseAdapter/MouseAdapterUnitTest/MouseAdapterUnitTest.java
$root=/net/jre.sfbay/p/v06/jdk/6.0/rc/b87/ws/j2se/test
author=andrei.dmitriev: area=
keywords=bug4453162
run=USER_SPECIFIED main MouseAdapterUnitTest\n
source=MouseAdapterUnitTest.java
title=MouseAdapter should implement MouseMotionListener and MouseWheelListener

#-----environment-----

#-----testresult-----
description=file:///net/jre.sfbay/p/v06/jdk/6.0/rc/b87/ws/j2se/test/java/awt/MouseAdapter/MouseAdapterUnitTest/MouseAdapterUnitTest.java
end=Tue Jun 13 14:33:33 PDT 2006
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come
javatestOS=SunOS 5.10 (sparc)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build main
start=Tue Jun 13 14:33:20 PDT 2006
status=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come
test=java/awt/MouseAdapter/MouseAdapterUnitTest/MouseAdapterUnitTest.java
work=/net/cady/export4/2d-workDir/java/awt/MouseAdapter/MouseAdapterUnitTest

#section:script_messages
----------messages:(4/213)----------
JDK under test: (/java/re/jdk/1.6.0/promoted/rc/b87/binaries/solaris-sparc)
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b87)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b87, mixed mode)

#section:build
----------messages:(3/107)----------
command: build MouseAdapterUnitTest 
reason: Named class compiled on demand
elapsed time (seconds): 0.0040
result: Passed. No need to compile: MouseAdapterUnitTest.java

#section:main
----------messages:(3/127)----------
command: main MouseAdapterUnitTest
reason: User specified action: run main MouseAdapterUnitTest 
elapsed time (seconds): 12.12
----------System.out:(13/371)----------
Any messages for the tester will display here.
Any messages for the tester will display here.
pressed = true
released = true
clicked = true
entered = true
rotated = false
dragged = true
moved = true
The test failed: Wheel event hasn't come
The test failed: Wheel event hasn't come
The test is over, hit  Ctl-C to stop Java VM
The test is over, hit  Ctl-C to stop Java VM

test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Wheel event hasn't come

Comments
EVALUATION From the other side 6438682 reports that WheelEvent doesn't come to other component. It may happen when Wheel doesn't enabled on the system. Should verify it.
15-06-2006

EVALUATION More likely it's a bug in test. public static void testWheelMouseButton(){ robot.mouseMove(pt.x + b.getWidth()/2, pt.y + b.getHeight()/2); robot.mouseWheel(10); >> We should wait a little to get JVM a chance to handle WheelEvent on EDT. if ( !rotated){ robot.delay() would be sufficient here but realSync should be used better.
15-06-2006