Skip to content

Commit

Permalink
Spotless fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Jul 4, 2023
1 parent c45249e commit 2a07d71
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,13 @@ public void testAcquireLock() throws IOException {
long testGeneration = 5;

List<String> metadataFiles = List.of("metadata__1__5__abc");
when(remoteMetadataDirectory.listFilesByPrefix(RemoteSegmentStoreDirectory.MetadataFilenameUtils.getMetadataFilePrefixForCommit(testPrimaryTerm, testGeneration))).thenReturn(metadataFiles);
when(remoteMetadataDirectory.listFilesByPrefix(remoteSegmentStoreDirectory.getLockIdentifier(testPrimaryTerm, testGeneration))).thenReturn(metadataFiles);
when(
remoteMetadataDirectory.listFilesByPrefix(
RemoteSegmentStoreDirectory.MetadataFilenameUtils.getMetadataFilePrefixForCommit(testPrimaryTerm, testGeneration)
)
).thenReturn(metadataFiles);
when(remoteMetadataDirectory.listFilesByPrefix(remoteSegmentStoreDirectory.getLockIdentifier(testPrimaryTerm, testGeneration)))
.thenReturn(metadataFiles);

IndexOutput indexOutput = mock(IndexOutput.class);
when(remoteLockDirectory.createOutput(any(), eq(IOContext.DEFAULT))).thenReturn(indexOutput);
Expand All @@ -431,8 +436,13 @@ public void testAcquireLockNoSuchFile() throws IOException {
long testGeneration = 5;

List<String> metadataFiles = List.of("metadata__1__5__abc");
when(remoteMetadataDirectory.listFilesByPrefix(RemoteSegmentStoreDirectory.MetadataFilenameUtils.getMetadataFilePrefixForCommit(testPrimaryTerm, testGeneration))).thenReturn(metadataFiles);
when(remoteMetadataDirectory.listFilesByPrefix(remoteSegmentStoreDirectory.getLockIdentifier(testPrimaryTerm, testGeneration))).thenReturn(List.of());
when(
remoteMetadataDirectory.listFilesByPrefix(
RemoteSegmentStoreDirectory.MetadataFilenameUtils.getMetadataFilePrefixForCommit(testPrimaryTerm, testGeneration)
)
).thenReturn(metadataFiles);
when(remoteMetadataDirectory.listFilesByPrefix(remoteSegmentStoreDirectory.getLockIdentifier(testPrimaryTerm, testGeneration)))
.thenReturn(List.of());

LockInfo lockInfo = FileLockInfo.getLockInfoBuilder()
.withFileToLock(remoteSegmentStoreDirectory.getLockIdentifier(testPrimaryTerm, testGeneration))
Expand Down

0 comments on commit 2a07d71

Please sign in to comment.