RFR: 8317287: [macos14] InterJVMGetDropSuccessTest.java: Child VM: abnormal termination [v6]

songpv-imt duke at openjdk.org
Tue Nov 21 08:40:41 UTC 2023


On Wed, 8 Nov 2023 09:28:13 GMT, songpv-imt <duke at openjdk.org> wrote:

>> The root cause of the bug is because mousePress() method is invoked before mouseMove() event is completely processed causing the drag & drop behavior not being able to be recognized properly. This in turn makes the method dragSourceListener.isDropFinished() returns false and fail the test. To fix this, setAutoWaitForIdle(true) and Thread.Sleep is called to make sure the mouseMove() event is processed completely before moving to execute the mousePress() method.
>> 
>> JBS issue: [JDK-8317287](https://bugs.openjdk.org/browse/JDK-8317287)
>
> songpv-imt has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update InterJVMGetDropSuccessTest.java
>   Change BUTTON1_MASK to BUTTON1_DOWN_MASK because BUTTON1_MASK is deprecated: https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/event/InputEvent.html#BUTTON1_MASK

Hmm... Are you suggesting instead of using SYNC_LOCK, for better code transparency, we should place the code that accesses the listener's fields from the main thread into AWT Event Queue with EventQueue.invokeAndWait? Can you please check if the update code meets your suggestion? Thanks.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16396#issuecomment-1820460444


More information about the client-libs-dev mailing list