Skip to content

Commit

Permalink
Increase logging testRetentionPolicyChangeDuringRecovery
Browse files Browse the repository at this point in the history
Relates #32089
  • Loading branch information
dnhatn committed Aug 13, 2018
1 parent 02ed973 commit dc60e44
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
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;
Expand Down Expand Up @@ -73,6 +74,7 @@ public void testTranslogHistoryTransferred() throws Exception {
}
}

@TestLogging("_root:TRACE")
public void testRetentionPolicyChangeDuringRecovery() throws Exception {
try (ReplicationGroup shards = createGroup(0)) {
shards.startPrimary();
Expand All @@ -99,7 +101,10 @@ public void testRetentionPolicyChangeDuringRecovery() throws Exception {
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));
});
}
}

Expand Down

0 comments on commit dc60e44

Please sign in to comment.