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: [email protected] For additional commands, e-mail: [email protected]
