mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Test: include dir listing when check index fails
This commit is contained in:
parent
3c2414128c
commit
a7e238dbb8
@ -48,6 +48,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
@ -136,7 +137,9 @@ public class MockFSDirectoryService extends FsDirectoryService {
|
||||
CheckIndex.Status status = checkIndex.checkIndex();
|
||||
if (!status.clean) {
|
||||
AbstractRandomizedTest.checkIndexFailed = true;
|
||||
logger.warn("check index [failure]\n{}", new String(os.bytes().toBytes(), Charsets.UTF_8));
|
||||
logger.warn("check index [failure] index files={}\n{}",
|
||||
Arrays.toString(dir.listAll()),
|
||||
new String(os.bytes().toBytes(), Charsets.UTF_8));
|
||||
throw new IndexShardException(shardId, "index check failure");
|
||||
} else {
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user