On Fri, 21 Feb 2025 07:41:35 GMT, Alan Bateman <[email protected]> wrote:
>> Brian Burkhalter has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains eight commits:
>>
>> - 8024695: Move getCWD to holder; remove Order from test
>> - Merge
>> - 8024695: Extend and clean up test
>> - 8024695: Fix merge error; improve get*Space tests
>> - Merge
>> - 8024695: Add test of length()
>> - 8024695: Change implementation to work for empty path
>> - 8024695: new File("").exists() returns false whereas it is the current
>> working directory
>
> 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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22821#discussion_r1965886696