JDK-8168389 : java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.html fails due to wrong number of MouseClick events
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8,8u112,9,11
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2016-10-19
  • Updated: 2023-10-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :


A DESCRIPTION OF THE PROBLEM :
The test java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.html intermittently fails due to wrong number of MouseClick events. The failure was observed on Mac OSX and Windows 10


ERROR MESSAGES/STACK TRACES THAT OCCUR :
the following output was produced on Mac OSX:

```
----------System.out:(4/312)----------
java.awt.event.MouseEvent[MOUSE_CLICKED,(25,50),absolute(125,150),button=1,modifiers=Button1,clickCount=1] on frame1
Test passed.
java.awt.event.MouseEvent[MOUSE_CLICKED,(50,50),absolute(150,150),button=1,modifiers=Button1,clickCount=0] on frame1
Wrong number of MouseClick events were generated: 1, expected: 0
----------System.err:(7/428)----------
java.lang.RuntimeException: Test failed!
        at MouseClickTest.oneButtonPressRelease(MouseClickTest.java:109)
        at MouseClickTest.runTests(MouseClickTest.java:76)
        at MouseClickTest.start(MouseClickTest.java:54)
        at com.sun.javatest.regtest.agent.AppletWrapper$AppletRunnable.run(AppletWrapper.java:158)
        at java.lang.Thread.run(Thread.java:745)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed!
```
and on ''Windows 10''

```
----------System.out:(1/66)----------
Wrong number of MouseClick events were generated: 0, expected: 1
----------System.err:(7/435)----------
java.lang.RuntimeException: Test failed!
        at MouseClickTest.oneButtonPressRelease(MouseClickTest.java:109)
        at MouseClickTest.runTests(MouseClickTest.java:75)
        at MouseClickTest.start(MouseClickTest.java:54)
        at com.sun.javatest.regtest.agent.AppletWrapper$AppletRunnable.run(AppletWrapper.java:158)
        at java.lang.Thread.run(Thread.java:745)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed!
```

REPRODUCIBILITY :
This bug can be reproduced occasionally.


Comments
I could not reproduce this issue on OS X
04-11-2016

Hi Abdul, Did you observe this issue on OS X with JDK 9 ?
03-11-2016

Reproduced with java/awt group test in windows environment - attached the error log. 8u51 b09 - 88u51_MouseClickTest_error_log.txt 8u122 b04 - 8u122_MouseClickTest_error_log.txt JDK9 build 142 - JDK9_build142_MouseClickTest_erro_log.txt
31-10-2016

According to the submitter, unfortunately, I have no chance to run these tests against JDK 9ea yet.
25-10-2016

According to the bug submitter, If you are interested in failures of this test then as stand-alone test case you can use the test located at http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/b30ecba1cd23/test/java/awt. The failures of this test I reported was observed running the test via jtreg. Please note in some cases it is difficult to reproduce running as a stand-alone test, it is also difficult to reproduce it via jtreg running only one test - so you probably need to run a group of tests like java/awt or java/awt/Focus.
20-10-2016

Requested bug filer to confirm us whether the issue is reproducible with JDK 9ea or not.
20-10-2016