Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontedor committed Jul 4, 2017
1 parent ab8eeb3 commit 93e751f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
import org.elasticsearch.index.mapper.SourceToParse;
import org.elasticsearch.index.seqno.SequenceNumbers;
import org.elasticsearch.index.seqno.SequenceNumbersService;
import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus;
import org.elasticsearch.index.store.Store;
Expand Down Expand Up @@ -738,6 +739,11 @@ public void onFailure(Exception e) {

public void testConcurrentTermIncreaseOnReplicaShard() throws BrokenBarrierException, InterruptedException, IOException {
final IndexShard indexShard = newStartedShard(false);
/*
* When a shard recovers from a primary, it will advance its global checkpoint. We simulate that here; since we are not performing
* any operations, we initialize to no operations performed as the local checkpoint on this shard carries the same value.
*/
indexShard.updateGlobalCheckpointOnReplica(SequenceNumbersService.NO_OPS_PERFORMED);

final CyclicBarrier barrier = new CyclicBarrier(3);
final CountDownLatch latch = new CountDownLatch(2);
Expand Down

0 comments on commit 93e751f

Please sign in to comment.