Skip to content

Commit

Permalink
Merge branch 'RemoteSegmentStoreDirectory' into views-core
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Feb 15, 2024
2 parents 8796381 + d77f812 commit 946a691
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
<<<<<<< HEAD
import java.util.regex.Pattern;
=======
>>>>>>> RemoteSegmentStoreDirectory
import java.util.stream.Collectors;

import org.mockito.Mockito;
Expand Down Expand Up @@ -995,20 +998,6 @@ public void testDeleteStaleCommitsActualDelete() throws Exception {
.map(metadata -> metadata.split(RemoteSegmentStoreDirectory.UploadedSegmentMetadata.SEPARATOR)[1])
.collect(Collectors.toList());

final String allFilesPattern = filesToBeDeleted.stream()
.map(Pattern::quote) // Make sure filenames are matched literally
.map(file -> "(?=.*?" + file + ")") // Allow for matches in any order
.collect(Collectors.joining("", "deletedSegmentFiles=\\[", ".*\\]"));

appender.addExpectation(
new MockLogAppender.PatternSeenWithLoggerPrefixExpectation(
"Deleted file segments message",
"org.opensearch.index.store.RemoteSegmentStoreDirectory",
Level.DEBUG,
allFilesPattern
)
);

remoteSegmentStoreDirectory.init();

// popluateMetadata() adds stub to return 3 metadata files
Expand Down

0 comments on commit 946a691

Please sign in to comment.