Skip to content

Commit 563c34b

Browse files
dbwiddismch2
authored andcommitted
Ignore lock file when testing cleanupAndPreserveLatestCommitPoint (opensearch-project#4544)
Signed-off-by: Daniel Widdis <[email protected]> Signed-off-by: Daniel Widdis <[email protected]> (cherry picked from commit 7ebb2af)
1 parent 083890f commit 563c34b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/src/test/java/org/opensearch/index/store/StoreTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,10 @@ public void testCleanupAndPreserveLatestCommitPoint() throws IOException {
11891189

11901190
// we want to ensure commitMetadata files are preserved after calling cleanup
11911191
for (String existingFile : store.directory().listAll()) {
1192-
assertTrue(commitMetadata.contains(existingFile));
1193-
assertFalse(additionalSegments.contains(existingFile));
1192+
if (!IndexWriter.WRITE_LOCK_NAME.equals(existingFile)) {
1193+
assertTrue(commitMetadata.contains(existingFile));
1194+
assertFalse(additionalSegments.contains(existingFile));
1195+
}
11941196
}
11951197
deleteContent(store.directory());
11961198
IOUtils.close(store);

0 commit comments

Comments
 (0)