On Wed, 27 Jan 2021 23:03:55 GMT, Mahendra Chhipa 
<github.com+34924738+mahendrachh...@openjdk.org> wrote:

>> test/jdk/java/lang/Class/getEnclosingClass/EnclosingClassTest.java line 126:
>> 
>>> 124:         Path pkg1Dir = Paths.get(SRC_DIR + "/pkg1");
>>> 125:         FileUtils.deleteFileTreeWithRetry(pkg1Dir);
>>> 126:     }
>> 
>> I'm not convinced the `@AfterClass` method is necessary.  Pre-cleanup is 
>> already done on LL94-95.  And occasionally, test-generated artifacts are 
>> helpful in post-mortem analysis.
>
> To keep the source code repo clean from temporary generated files, these 
> files are removed after test. Test logs have the information about the 
> generated files for the Postmortem analysis.

Test files shouldn't be written into the repository (repos are sometimes tested 
on read-only filesystems).  Files should be written under JTwork/scratch/.

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

PR: https://git.openjdk.java.net/jdk/pull/2170

Reply via email to