Skip to content

Commit

Permalink
expectThrows
Browse files Browse the repository at this point in the history
  • Loading branch information
ywelsch committed Jun 27, 2018
1 parent 88eac6f commit 649f2f2
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ public void testUpgradeStartClusterOn_2_4_5() throws Exception {

logger.info("Checking static index {}", indexName);
Settings nodeSettings = prepareBackwardsDataDir(getBwcIndicesPath().resolve(indexName + ".zip"));
try {
internalCluster().startNode(nodeSettings);
fail();
} catch (Exception ex) {
assertThat(ex.getCause().getCause().getMessage(), containsString("Format version is not supported"));
}
assertThat(expectThrows(Exception.class, () -> internalCluster().startNode(nodeSettings))
.getCause().getCause().getMessage(), containsString("Format version is not supported"));
}
}

0 comments on commit 649f2f2

Please sign in to comment.