Skip to content

Commit 5dd1c9a

Browse files
committed
Rename to initializingShard
1 parent ae93883 commit 5dd1c9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,13 +3339,13 @@ public void testWaitForPrimaryTermAndGenerationFailsForClosedShard() throws IOEx
33393339
Settings settings = indexSettings(IndexVersion.current(), 1, 1).build();
33403340
IndexMetadata metadata = IndexMetadata.builder("test").putMapping("""
33413341
{ "properties": { "foo": { "type": "text"}}}""").settings(settings).primaryTerm(0, 1).build();
3342-
IndexShard primary = newShard(new ShardId(metadata.getIndex(), 0), true, "n1", metadata, null);
3342+
IndexShard initializingShard = newShard(new ShardId(metadata.getIndex(), 0), true, "n1", metadata, null);
33433343

33443344
var future = new PlainActionFuture<Long>();
3345-
primary.waitForPrimaryTermAndGeneration(0L, 0L, future);
3345+
initializingShard.waitForPrimaryTermAndGeneration(0L, 0L, future);
33463346

33473347
assertFalse("waitForPrimaryTermAndGeneration should be waiting", future.isDone());
3348-
closeShards(primary);
3348+
closeShards(initializingShard);
33493349
// Should bail out earlier without calling the engine
33503350
assertNotNull(ExceptionsHelper.unwrap(expectThrows(Exception.class, future::get), IndexShardClosedException.class));
33513351
}

0 commit comments

Comments
 (0)