RFR: JDK-8340332 : Open source mixed AWT tests - Set3
Harshitha Onkar
honkar at openjdk.org
Mon Sep 30 18:16:41 UTC 2024
On Mon, 30 Sep 2024 17:40:36 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Following tests are open-sourced in this PR:
>>
>> 1. /java/awt/MouseInfo/ContainerResizeMousePositionTest.java - Automated
>> 2. [LINUX ONLY] /java/awt/color/XAWTDifference/XAWTDifference.java - Manual PFJ test
>
> test/jdk/java/awt/MouseInfo/ContainerResizeMousePositionTest.java line 95:
>
>> 93:
>> 94: if (!eventCaught.await(2, TimeUnit.SECONDS)) {
>> 95: if (!testSucceeded) {
>
> These two conditions look independent.
>
> If `eventCaught.await` returned `false`, the test should fail with a timeout.
>
> Otherwise, the test fails if `testSucceeded` didn't become `true`.
Did you mean this way ?
if (eventCaught.await(2, TimeUnit.SECONDS)) {
if (!testSucceeded) {
throw new RuntimeException("Test Failed: Container.getMousePosition(boolean)"
+ " returned incorrect result while Container resized");
}
} else {
throw new RuntimeException("Test timeout: Didn't receive"
+ " Component Resized Event");
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21271#discussion_r1781562446
More information about the client-libs-dev
mailing list