From 8a003e1281446820db5f73f231767dfcf2a48e72 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Mon, 13 Aug 2018 16:29:34 -0400 Subject: [PATCH] Increase logging testRetentionPolicyChangeDuringRecovery Relates #32089 --- .../org/elasticsearch/indices/recovery/RecoveryTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTests.java b/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTests.java index 99848f64571..7ca9dcc82f7 100644 --- a/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTests.java +++ b/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTests.java @@ -43,6 +43,7 @@ import org.elasticsearch.index.seqno.SequenceNumbers; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.translog.SnapshotMatchers; import org.elasticsearch.index.translog.Translog; +import org.elasticsearch.test.junit.annotations.TestLogging; import java.util.HashMap; import java.util.List; @@ -73,6 +74,7 @@ public class RecoveryTests extends ESIndexLevelReplicationTestCase { } } + @TestLogging("_root:TRACE") public void testRetentionPolicyChangeDuringRecovery() throws Exception { try (ReplicationGroup shards = createGroup(0)) { shards.startPrimary(); @@ -99,7 +101,10 @@ public class RecoveryTests extends ESIndexLevelReplicationTestCase { releaseRecovery.countDown(); future.get(); // rolling/flushing is async - assertBusy(() -> assertThat(replica.estimateTranslogOperationsFromMinSeq(0), equalTo(0))); + assertBusy(() -> { + assertThat(replica.getLastSyncedGlobalCheckpoint(), equalTo(19L)); + assertThat(replica.estimateTranslogOperationsFromMinSeq(0), equalTo(0)); + }); } }