We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88eac6f commit 649f2f2Copy full SHA for 649f2f2
server/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java
@@ -86,11 +86,7 @@ public void testUpgradeStartClusterOn_2_4_5() throws Exception {
86
87
logger.info("Checking static index {}", indexName);
88
Settings nodeSettings = prepareBackwardsDataDir(getBwcIndicesPath().resolve(indexName + ".zip"));
89
- try {
90
- internalCluster().startNode(nodeSettings);
91
- fail();
92
- } catch (Exception ex) {
93
- assertThat(ex.getCause().getCause().getMessage(), containsString("Format version is not supported"));
94
- }
+ assertThat(expectThrows(Exception.class, () -> internalCluster().startNode(nodeSettings))
+ .getCause().getCause().getMessage(), containsString("Format version is not supported"));
95
}
96
0 commit comments