Skip to content

Commit

Permalink
Fix CorruptedBlobStoreRepository Test (#51128) (#51187)
Browse files Browse the repository at this point in the history
The tests, when creating broken serialized blobs could randomly create
a sequence of bytes that is partially readable by the deserializer and then
not throw `IOException` but instead `ElasticsearchParseException`.
We should just handle these unexpected exceptions downstream properly and pass them
wrapped as `RepositoryException` to the listener to fix the test and keep the API consistent.
  • Loading branch information
original-brownbear authored Jan 18, 2020
1 parent cb43513 commit 57bef12
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,9 @@ public void getRepositoryData(ActionListener<RepositoryData> listener) {
listener.onFailure(e);
}
return;
} catch (Exception e) {
listener.onFailure(new RepositoryException(metadata.name(), "Unexpected exception when loading repository data", e));
return;
}
}
}
Expand Down

0 comments on commit 57bef12

Please sign in to comment.