Skip to content

Commit

Permalink
Ignore lock file when testing cleanupAndPreserveLatestCommitPoint (#4544
Browse files Browse the repository at this point in the history
)

Signed-off-by: Daniel Widdis <widdis@gmail.com>

Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis authored Sep 21, 2022
1 parent 2c27dfd commit 7ebb2af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- 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))
- Fixed flaky test `ResourceAwareTasksTests.testTaskIdPersistsInThreadContext` ([#4484](https://github.com/opensearch-project/OpenSearch/pull/4484))
- Fixed the ignore_malformed setting to also ignore objects ([#4494](https://github.com/opensearch-project/OpenSearch/pull/4494))
- [Segment Replication] Ignore lock file when testing cleanupAndPreserveLatestCommitPoint ([#4544](https://github.com/opensearch-project/OpenSearch/pull/4544))
- Updated jackson to 2.13.4 and snakeyml to 1.32 ([#4556](https://github.com/opensearch-project/OpenSearch/pull/4556))

### Security
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,8 +1189,10 @@ public void testCleanupAndPreserveLatestCommitPoint() throws IOException {

// we want to ensure commitMetadata files are preserved after calling cleanup
for (String existingFile : store.directory().listAll()) {
assertTrue(commitMetadata.contains(existingFile));
assertFalse(additionalSegments.contains(existingFile));
if (!IndexWriter.WRITE_LOCK_NAME.equals(existingFile)) {
assertTrue(commitMetadata.contains(existingFile));
assertFalse(additionalSegments.contains(existingFile));
}
}
deleteContent(store.directory());
IOUtils.close(store);
Expand Down

0 comments on commit 7ebb2af

Please sign in to comment.