Skip to content

Commit

Permalink
Do not ingnore tear down exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Oct 5, 2020
1 parent 0481696 commit 9c62e9a
Showing 1 changed file with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.nio.file.Files;
import java.util.Arrays;

import static io.airlift.testing.Closeables.closeAll;
import static io.prestosql.plugin.hive.HiveErrorCode.HIVE_FILESYSTEM_ERROR;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertSame;
Expand Down Expand Up @@ -68,17 +69,9 @@ public void truncateTempFile()
public void tearDown()
throws Exception
{
try {
fs.delete(tempFile, true);
}
catch (IOException ignored) {
}
try {
fs.delete(new Path(tempRoot.toURI()), true);
}
finally {
fs.close();
}
closeAll(
() -> fs.delete(new Path(tempRoot.toURI()), true),
fs);
}

@Test
Expand Down

0 comments on commit 9c62e9a

Please sign in to comment.