commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Schumacher <pascalschumac...@gmx.net>
Subject Re: [IO] Releasing 2.6
Date Thu, 28 Sep 2017 07:39:53 GMT
Am 28.09.2017 um 00:14 schrieb Stian Soiland-Reyes:
> The new error is:
>    FileSystemUtilsTestCase.testGetFreeSpace_String:89
> expected:<1.02861164E8> but was:<1.0286066E8>
>
> I have:
>                 5 Dir(s)  104,991,649,792 bytes free
>
> Test calls:
>
>              final long bytes = FileSystemUtils.freeSpace("");
>              final long kb = FileSystemUtils.freeSpaceKb("");
>              assertEquals((double) bytes / 1024, kb, 256d);
>
> Presumably something else on my machine downloaded 504 kB between the
> two freeSpace calls – which is not much these days – perhaps one email
> :-)
>
> I changed the test to use instead a 1% delta, which should generally
> be a considerable amount of disk space (1 GB in my case), which is
> still small enough to detect the ~2.4% difference between a kilobyte
> vs kibibyte (the legacy freeSpaceKb is misnamed, it actually returns
> kibibyte instead of pre-1998 “kilobyte”)
Thanks!
> I think then we can deprecate the whole FileSystemUtils class as well.
+1

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message