RFR: JDK-8340555 : Open source DnD tests - Set4 [v5]
Harshitha Onkar
honkar at openjdk.org
Tue Oct 1 19:06:36 UTC 2024
On Mon, 30 Sep 2024 13:16:07 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> removed redundant frame.setLocation()
>
> test/jdk/java/awt/dnd/DragSourceMotionListenerTest.java line 82:
>
>> 80: private static final Point testPoint2 = new Point();
>> 81: private static volatile Point srcPoint;
>> 82: private static volatile Dimension d;
>
> `d` shouldn't be `volatile`; it should rather be a local variable in all the `invokeAndWait` calls — it's used only there.
Updated
> test/jdk/java/awt/dnd/DragSourceMotionListenerTest.java line 165:
>
>> 163: dstOutsidePoint.translate(3 * d.width / 2, d.height / 2);
>> 164: });
>> 165: testPoint1.setLocation(dstOutsidePoint);
>
> EDT is not guaranteed to see the updated values of `testPoint2` fields without additional synchronisation, and you need it for `sourceAdapter.dragMouseMoved`.
Updated
> test/jdk/java/awt/dnd/DragToAnotherScreenTest.java line 73:
>
>> 71: If the second label changes its text to drag me
>> 72: after the drop and you DO NOT see any error messages
>> 73: in the log area press PASS else FAIL.
>
> I think we can make it semi-automatic then. If the test determines an error condition, the test could fail automatically.
>
> However, to give a better experience for the tester, the test could display a message before calling `forceFail`.
>
> Another way could be disabling the `Pass` button, yet it's not possible at the moment.
@aivanov-jdk I have added PFJ.forcePass() and forceFail() , added JOptionPane msg so that user has time to read the success/failure msg.
Just a thought: May be it it is good to add a delay in PFJ's forcePass() and forceFail() which gives time for the user to see any messages or logs in the logArea.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21213#discussion_r1783354872
PR Review Comment: https://git.openjdk.org/jdk/pull/21213#discussion_r1783353109
PR Review Comment: https://git.openjdk.org/jdk/pull/21213#discussion_r1783352673
More information about the client-libs-dev
mailing list