Skip to content

Commit

Permalink
Fix unit test (opensearch-project#9099)
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
dreamer-89 committed Aug 3, 2023
1 parent b9c5a0d commit ae9373a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ public void testUploadMetadataMissingSegment() throws IOException {
IndexOutput indexOutput = mock(IndexOutput.class);

String generation = RemoteStoreUtils.invertLong(segmentInfos.getGeneration());
String primaryTerm = RemoteStoreUtils.invertLong(12);
long primaryTermLong = indexShard.getLatestReplicationCheckpoint().getPrimaryTerm();
String primaryTerm = RemoteStoreUtils.invertLong(primaryTermLong);
when(storeDirectory.createOutput(startsWith("metadata__" + primaryTerm + "__" + generation), eq(IOContext.DEFAULT))).thenReturn(
indexOutput
);
Expand Down

0 comments on commit ae9373a

Please sign in to comment.