Skip to content

Commit

Permalink
trigger clean dir when unzip fails with IOException (#6178)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijianding authored and fjy committed Aug 17, 2018
1 parent b0cf8d0 commit 78fc5b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ public void testDeleteOutputDirectoryWhenErrorIsRaisedPullingSegmentFiles()
final File outDir = Files.createTempDirectory("druid").toFile();
try {
expect(azureStorage.getBlobInputStream(containerName, blobPath)).andThrow(
new StorageException(
new URISyntaxException(
"error",
"error",
404,
null,
null
404
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ public static FileUtils.FileCopyResult unzip(
DEFAULT_RETRY_COUNT
);
}
catch (IOException e) {
throw e;
}
catch (Exception e) {
throw Throwables.propagate(e);
}
Expand Down

0 comments on commit 78fc5b2

Please sign in to comment.