Hi I suggest to test this on Windows as well. And do a fix in a single file to ensure it works across the CI servers etc.
On Tue, Nov 20, 2012 at 11:08 AM, Babak Vahdat <babak.vah...@swissonline.ch> wrote: > Hi > > Looking at unit-tests all over the places we've got *tons* of this API > call, like: > > assertTrue("File should not have been deleted", new > File("target/files/report.txt").getAbsoluteFile().exists()); > > Which could simply be modified to > > assertTrue("File should not have been deleted", new > File("target/files/report.txt").exists()); > > > The only benefit I see is that using this API you would see the absolute > file/directory path at the stacktraces when the asserts would fail, like: > > > File file = new File("target/issue/test.txt").getAbsoluteFile() > > assertTrue("File " + file + " should exist", file.exists()); > > Note that by the example above we instantiate 2 file handles, one of which > we don't reference at all, which's the "new File("target/issue/test.txt")" > object. > > If there's no other advantages I'm missing here I would suggest to remove > all such these calls, as it consumes both the CPU-time as well makes I/O, > not sure though how expensive really these (native OS) calls would be, but > for sure they're not for free. > > Thoughts? > > Babak > > > > -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen