From dd0bcfb300f071033ef170a3867e3e38faa27c48 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Mon, 3 Sep 2018 17:06:12 +0200 Subject: [PATCH] TESTS+DISTR.: Fix testIndexCheckOnStartup Flake (#33349) * 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 ed52348ba2949..89f6bade2a0cd 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java @@ -2594,7 +2594,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); @@ -2648,7 +2647,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 } }