RFR: 8349351 : Combine Screen Inset Tests into a Single File
Alexey Ivanov
aivanov at openjdk.org
Fri Feb 7 16:37:12 UTC 2025
On Thu, 6 Feb 2025 23:45:43 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> While working on [JDK-6899304](https://bugs.openjdk.org/browse/JDK-6899304), we discovered that there are two tests meant to perform the same task.
>>
>> The first test is located at test/jdk/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java and was originally designed for multi-screen configurations on Linux platforms.
>>
>> The second test, located at test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java, is intended for single-screen configurations but lacks accuracy due to some workarounds to support Windows.
>>
>> Now, the test at test/jdk/java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java has been updated to work across all platforms, including Windows, which was previously failing. As a result, it has been agreed to rename this test to ScreenInsetsTest, remove the condition that restricted its execution to multi-screen configurations, and remove the redundant test at test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java.
>
> test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java line 47:
>
>> 45: private static final int SIZE = 100;
>> 46: // Allow a margin tolerance of 1 pixel due to scaling
>> 47: private static final int MARGIN_TOLERANCE = 1;
>
> Since this test is extended to both single and multi monitor, I think tolerance can be increased to 2-3 (considering this test runs on CI now).
Is it needed? If there are no failures, I see no reason to increase the tolerance.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23449#discussion_r1946827397
More information about the client-libs-dev
mailing list