Increase logging testRetentionPolicyChangeDuringRecovery

Relates #32089
This commit is contained in:
Nhat Nguyen 2018-08-13 16:29:34 -04:00
parent cba7fceb53
commit 8a003e1281
1 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,7 @@ import org.elasticsearch.index.seqno.SequenceNumbers;
import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.translog.SnapshotMatchers; import org.elasticsearch.index.translog.SnapshotMatchers;
import org.elasticsearch.index.translog.Translog; import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.test.junit.annotations.TestLogging;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -73,6 +74,7 @@ public class RecoveryTests extends ESIndexLevelReplicationTestCase {
} }
} }
@TestLogging("_root:TRACE")
public void testRetentionPolicyChangeDuringRecovery() throws Exception { public void testRetentionPolicyChangeDuringRecovery() throws Exception {
try (ReplicationGroup shards = createGroup(0)) { try (ReplicationGroup shards = createGroup(0)) {
shards.startPrimary(); shards.startPrimary();
@ -99,7 +101,10 @@ public class RecoveryTests extends ESIndexLevelReplicationTestCase {
releaseRecovery.countDown(); releaseRecovery.countDown();
future.get(); future.get();
// rolling/flushing is async // rolling/flushing is async
assertBusy(() -> assertThat(replica.estimateTranslogOperationsFromMinSeq(0), equalTo(0))); assertBusy(() -> {
assertThat(replica.getLastSyncedGlobalCheckpoint(), equalTo(19L));
assertThat(replica.estimateTranslogOperationsFromMinSeq(0), equalTo(0));
});
} }
} }