Skip to content

Commit 84a9c75

Browse files
s1monwjpountz
authored andcommitted
[TEST] Remove corrupted index before checkindex goes wild
1 parent 99c2a63 commit 84a9c75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/org/elasticsearch/index/store/StoreTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.elasticsearch.ExceptionsHelper;
3232
import org.elasticsearch.common.logging.ESLogger;
3333
import org.elasticsearch.common.logging.Loggers;
34+
import org.elasticsearch.common.lucene.Lucene;
3435
import org.elasticsearch.common.settings.ImmutableSettings;
3536
import org.elasticsearch.common.settings.Settings;
3637
import org.elasticsearch.common.unit.TimeValue;
@@ -1305,6 +1306,7 @@ public void testMarkCorruptedOnTruncatedSegmentsFile() throws IOException {
13051306
// expected
13061307
}
13071308
assertTrue(store.isMarkedCorrupted());
1309+
Lucene.cleanLuceneIndex(store.directory()); // we have to remove the index since it's corrupted and might fail the MocKDirWrapper checkindex call
13081310
store.close();
13091311
}
13101312

0 commit comments

Comments
 (0)