Skip to content

Commit

Permalink
nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed May 8, 2019
1 parent 7aff091 commit 685eed4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,12 @@ protected void failEngine(IOException cause) {
handler.sendFiles(store, metas.toArray(new StoreFileMetaData[0]), () -> 0);
fail("exception index");
} catch (RuntimeException ex) {
assertNotNull(ExceptionsHelper.unwrapCorruption(ex));
final IOException unwrappedCorruption = ExceptionsHelper.unwrapCorruption(ex);
if (throwCorruptedIndexException) {
assertNotNull(unwrappedCorruption);
assertEquals(ex.getMessage(), "[File corruption occurred on recovery but checksums are ok]");
} else {
assertNull(unwrappedCorruption);
assertEquals(ex.getMessage(), "boom");
}
} catch (CorruptIndexException ex) {
Expand Down

0 comments on commit 685eed4

Please sign in to comment.