commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <phil.ste...@gmail.com>
Subject Re: [io] Help with testing on Unix - FileSystemUtils returns incorrect free space on Linux
Date Sat, 04 Mar 2006 21:39:01 GMT
Found the source of the test failures for me.  I think the code and
test cases are correct, but somehow the clock precision or something
else is messing up the chronology for me.  The tests all pass if I
make spin wait until a full second has elapsed:

private void spin(long now) {
        while (System.currentTimeMillis() <= now + 1000);  <-- add a sec.
}

That slows down the tests a bit, but makes them pass.  Has this been
reported before?

Phil

On 3/4/06, Phil Steitz <phil.steitz@gmail.com> wrote:
> Works4me on RH FC 2, with both Kb and original method returning kbytes.
>
> Looks like there is a cut and paste error in the javadoc for the new
> method, though.  The "Kb" seems to be missing from the examples.
>
> I am also getting test failures for the FileFilterTestCase.  The
> newfile tests are failing.  I will look at this some more.
>
> Phil
>
> On 3/4/06, Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> > If anyone has the ability to test FileSystemUtils.freeSpaceKb() on boxes
> > other than WindowsXP I'd like to know if the results tally what you'd
> > expect by calling dir/df directly.
> >
> > thanks
> > Stephen
> >
> >
> > bugzilla@apache.org wrote:
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=38574
> > > ------- Additional Comments From scolebourne@joda.org  2006-03-04 20:16 -------
> > > FileSystemUtils.freeSpaceKb(drive)
> > > New method that unifies result to be in kilobytes
> > >
> > > Please reopen if you believe that the new method returns the wrong result (I
can
> > > on test on Windows)
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>

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


Mime
View raw message