From 84684597b29bbad8ba300fbf38825c3173dfa134 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Mon, 3 Sep 2018 14:40:29 +0200 Subject: [PATCH] TESTS+DISTR.: Fix testIndexCheckOnStartup Flake * Ignore all `RuntimeException` since random file corruption triggers other RTE in addition to the randomly caught one * closes #33345 --- .../java/org/elasticsearch/index/shard/IndexShardTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java index 876e8fa42556e..e8fc8a71a5b83 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java @@ -2596,7 +2596,6 @@ public void testReadSnapshotConcurrently() throws IOException, InterruptedExcept closeShards(newShard); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/33345") public void testIndexCheckOnStartup() throws Exception { final IndexShard indexShard = newStartedShard(true); @@ -2650,7 +2649,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO try { closeShards(corruptedShard); } catch (RuntimeException e) { - assertThat(e.getMessage(), equalTo("CheckIndex failed")); + // Ignored because corrupted shard can throw various exceptions on close } }