RFR: 8295738: Automate javax/swing/JFileChooser/FileSizeCheck.java [v2]

Sergey Bylokhov serb at openjdk.org
Fri Oct 21 19:15:55 UTC 2022


On Fri, 21 Oct 2022 11:34:05 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> This automates the test added in #9327.
>> 
>> The test has a set of objects which store the size of the file and the expected displayed size, the file name is generated automatically. The pattern for the file names ensures the files are displayed in the expected order up to and including gigabytes, 10 digits. I added more test cases that the original test had to verify the displayed size is rounded up, an automatic test can easily verify more rows than a human can.
>> 
>> The finds the **Details** button in the file chooser and clicks it, then it finds the table, finds the row where the first file is displayed. The test compares the size displayed in the table to the expected one. If it doesn't match, an error is printed to `stderr`. All the file sizes are verified. The first error message, if any, is thrown to fail the test.
>> 
>> The test passes with the fix for [JDK-8288882](https://bugs.openjdk.org/browse/JDK-8288882) and fails without it.
>
> Alexey Ivanov has updated the pull request incrementally with four additional commits since the last revision:
> 
>  - Set the locale to US
>  - Adjust wrapping for error message
>  - Use local variable to store first error message
>  - Shorter error message

Marked as reviewed by serb (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/10802



More information about the client-libs-dev mailing list