toshsan / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Fix tests to use JUnit rules for temporary files #222

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running com.google.caliper.config.CaliperConfigTest
Tests run: 7, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.016 sec <<< 
FAILURE!
Running com.google.caliper.config.LoggingConfigLoaderTest
Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec <<< 
FAILURE!

The tests fails because it cannot cleanup and delete test files.

private static void deleteDirectoryContents(File directory) throws IOException {
if (!directory.getCanonicalPath().equals(directory.getAbsolutePath())) {
  return;
}

canonical path= 
/private/var/folders/7f/53r_2c0d3j7fr5sng6ng_0b00000gn/T/1361137568147-0
absolute path = /var/folders/7f/53r_2c0d3j7fr5sng6ng_0b00000gn/T/1361137568147-0

Original issue reported on code.google.com by kaspe...@gmail.com on 17 Feb 2013 at 9:56

GoogleCodeExporter commented 9 years ago
I have no idea why this test is doing this manually…  This should be cleaned 
up anyway.  Thanks for the report.

Original comment by gak@google.com on 20 Feb 2013 at 1:07

GoogleCodeExporter commented 9 years ago
Issue 225 has been merged into this issue.

Original comment by gak@google.com on 25 Feb 2013 at 4:17

GoogleCodeExporter commented 9 years ago
In the meantime, you can just skip the tests…

Original comment by gak@google.com on 25 Feb 2013 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by gak@google.com on 2 Apr 2013 at 9:44