RFR: 8327748: Convert javax/swing/JFileChooser/6798062/bug6798062.java applet test to main [v4]

Alexey Ivanov aivanov at openjdk.org
Tue Mar 12 11:43:13 UTC 2024


On Tue, 12 Mar 2024 11:24:37 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/6798062/bug6798062.java line 108:
>> 
>>> 106: 
>>> 107:         try {
>>> 108:             folder = ShellFolder.getShellFolder(new File("."));
>> 
>> I wonder if it was expected that there are files in the directory. Like yes, so I could be wrong. I assumed files were created but no file is created, instead the files in this directory is listed. The expected result is that each file in the directory creates a new `ShellFolder` instance.
>
> I think it's needed to have some files in the directory..
> This test is problemlisted actually and as per [this comment](https://bugs.openjdk.org/browse/JDK-8146446?focusedId=13884125&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13884125) it needs to be tested on a directory with some files in it but sometimes, in CI system temp folder may have thousand of files so I think we should revert back to "java.io.tmpdir" for this test sprint and figure out the fix for the tmpdir in JDK-8146446...Any objection?

One way to handle it is to create a number of files in the current directory, the `scratch` directory that jtreg provides and then rely on jtreg to remove it. Or to create a temp directory in the current directory and create files there.

We have no control over how many files are in the temporary directory, however, in most cases it's not empty.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18180#discussion_r1521313859


More information about the client-libs-dev mailing list