Skip to content

Commit 7ebb2af

Browse files
authored
Ignore lock file when testing cleanupAndPreserveLatestCommitPoint (opensearch-project#4544)
Signed-off-by: Daniel Widdis <widdis@gmail.com> Signed-off-by: Daniel Widdis <widdis@gmail.com>
1 parent 2c27dfd commit 7ebb2af

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7272
- Getting security exception due to access denied 'java.lang.RuntimePermission' 'accessDeclaredMembers' when trying to get snapshot with S3 IRSA ([#4469](https://github.com/opensearch-project/OpenSearch/pull/4469))
7373
- Fixed flaky test `ResourceAwareTasksTests.testTaskIdPersistsInThreadContext` ([#4484](https://github.com/opensearch-project/OpenSearch/pull/4484))
7474
- Fixed the ignore_malformed setting to also ignore objects ([#4494](https://github.com/opensearch-project/OpenSearch/pull/4494))
75+
- [Segment Replication] Ignore lock file when testing cleanupAndPreserveLatestCommitPoint ([#4544](https://github.com/opensearch-project/OpenSearch/pull/4544))
7576
- Updated jackson to 2.13.4 and snakeyml to 1.32 ([#4556](https://github.com/opensearch-project/OpenSearch/pull/4556))
7677

7778
### Security

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)