Skip to content

Commit

Permalink
assert non-null failure
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jun 28, 2023
1 parent 98e8758 commit 748f2e7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public void onAllNodesStopped() throws Exception {
final UnassignedInfo unassignedInfo = allocationExplainResponse.getExplanation().getUnassignedInfo();
assertThat(description, unassignedInfo, not(nullValue()));
assertThat(description, unassignedInfo.getReason(), equalTo(UnassignedInfo.Reason.ALLOCATION_FAILED));
final Throwable cause = ExceptionsHelper.unwrap(unassignedInfo.getFailure(), TranslogCorruptedException.class);
var failure = unassignedInfo.getFailure();
assertNotNull(failure);
final Throwable cause = ExceptionsHelper.unwrap(failure, TranslogCorruptedException.class);
if (cause != null) {
assertThat(description, cause.getMessage(), containsString(translogPath.toString()));
}
Expand Down

0 comments on commit 748f2e7

Please sign in to comment.