add back opem mode randomization

This commit is contained in:
Simon Willnauer 2016-03-31 13:06:23 +02:00
parent a356f74d4d
commit 0a277227c3
1 changed files with 2 additions and 2 deletions

View File

@ -918,9 +918,9 @@ public class InternalEngineTests extends ESTestCase {
} else {
engine.flushAndClose();
}
engine = new InternalEngine(copy(config, EngineConfig.OpenMode.OPEN_INDEX_AND_TRANSLOG));
engine = new InternalEngine(copy(config, randomFrom(EngineConfig.OpenMode.OPEN_INDEX_AND_TRANSLOG, EngineConfig.OpenMode.OPEN_INDEX_CREATE_TRANSLOG)));
if (randomBoolean()) {
if (engine.config().getOpenMode() == EngineConfig.OpenMode.OPEN_INDEX_AND_TRANSLOG && randomBoolean()) {
engine.recoverFromTranslog();
}
assertEquals(engine.getLastCommittedSegmentInfos().getUserData().get(Engine.SYNC_COMMIT_ID), syncId);