RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v2]

Daniel Fuchs dfuchs at openjdk.org
Tue Apr 16 15:52:01 UTC 2024


On Mon, 15 Apr 2024 20:41:10 GMT, Tim Prinzing <tprinzing at openjdk.org> wrote:

>> test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 50:
>> 
>>> 48: 
>>> 49:     public static void main(String[] args) throws Throwable {
>>> 50:         File blah = File.createTempFile("blah", null);
>> 
>> Can you change this to use the tests's scratch rather that /tmp, meaning `Files.createTempFile(Path.of("."), "blah", "jfr")`. That way the file is available in the event that the test fails.
>
> I'm not sure what you mean about the recording.  The file is the AsynchronousFileChannel under test and does not contain the event recording.

It's anyway better to create temporary files in the test scratch directory rather than in /tmp. This way the temp files get cleaned up with the test, and there less chances of conflicts if several tests are running concurrently (and less chances on slowly filling up /tmp onthe machine if clean up actions fail)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1567596755


More information about the core-libs-dev mailing list