On Fri, 21 Feb 2025 17:03:36 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> test/jdk/java/io/File/EmptyPath.java line 121:
>> 
>>> 119:             assertTrue(actual > 0);
>>> 120:             long ds = Math.abs(expected - actual);
>>> 121:             assertTrue((double)ds/expected < 0.05);
>> 
>> Are you confident that this tolerance is enough? Every test that has checked 
>> space available/used has taken a long time to bed in. For this test then I 
>> don't think we need to assert any relationship between the allocated and 
>> free space, it really just needs to check that it returns some value for the 
>> current directory.
>
> I don't recall asserting any relationship between the allocated and free 
> space. Initially I had this simply checking that each returned space value 
> was positive. Do you think that that is enough?

My comment is about the tests getTotalSpace/getFreeSpace/getUsableSpace as they 
check that the results are close to the FIleStore equivalent. My concern is how 
stable this is with other tests running in other agent VMs as the file usage 
will change while the test runs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22821#discussion_r1965900240

Reply via email to