From 1201038ee3b2aa2a6a056913424951584fcf79ef Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Thu, 16 Feb 2023 00:17:24 -0800 Subject: [PATCH] Fix broken test in SegmentReplicationSourceServiceTests. Signed-off-by: Marc Handalian --- .../replication/SegmentReplicationSourceServiceTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/test/java/org/opensearch/indices/replication/SegmentReplicationSourceServiceTests.java b/server/src/test/java/org/opensearch/indices/replication/SegmentReplicationSourceServiceTests.java index 3fc5af0fe80d4..c866a82b0b20e 100644 --- a/server/src/test/java/org/opensearch/indices/replication/SegmentReplicationSourceServiceTests.java +++ b/server/src/test/java/org/opensearch/indices/replication/SegmentReplicationSourceServiceTests.java @@ -48,6 +48,7 @@ public void setUp() throws Exception { super.setUp(); // setup mocks IndexShard mockIndexShard = CopyStateTests.createMockIndexShard(); + when(mockIndexShard.verifyPrimaryMode()).thenReturn(true); ShardId testShardId = mockIndexShard.shardId(); IndicesService mockIndicesService = mock(IndicesService.class); IndexService mockIndexService = mock(IndexService.class);