Skip to content

Commit db4facb

Browse files
author
Gagan Singh Saini
committed
Remove sync method unit test
Signed-off-by: Gagan Singh Saini <gagasa@amazon.com>
1 parent 81c0cd0 commit db4facb

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,6 @@ public void testCreateOutput() throws IOException {
126126
assertNotNull(fileCache.get(localDirectory.getDirectory().resolve(NEW_FILE)));
127127
}
128128

129-
public void testSync() throws IOException {
130-
// All the files in the below list are present either locally or on remote, so sync should work as expected
131-
Collection<String> names = List.of("_0.cfe", "_0.cfs", "_0.si", "_1.cfe", "_2.cfe", "segments_1");
132-
compositeDirectory.sync(names);
133-
// Deleting file _1.cfe and then adding its blocks locally so that full file is not present but block files are present in local
134-
// State of _1.cfe file after these operations - not present in remote, full file not present locally but blocks present in local
135-
compositeDirectory.deleteFile("_1.cfe");
136-
addFilesToDirectory(new String[] { "_1.cfe_block_0", "_1.cfe_block_2" });
137-
// Sync should work as expected since blocks are present in local
138-
compositeDirectory.sync(List.of("_1.cfe"));
139-
// Below list contains a non-existent file, hence will throw an error
140-
Collection<String> names1 = List.of("_0.cfe", "_0.cfs", "_0.si", "_1.cfe", "_2.cfe", "segments_1", "non_existent_file");
141-
assertThrows(NoSuchFileException.class, () -> compositeDirectory.sync(names1));
142-
}
143-
144129
public void testRename() throws IOException {
145130
// Rename should work as expected for file present in directory
146131
assertTrue(existsInCompositeDirectory(FILE_PRESENT_LOCALLY));

0 commit comments

Comments
 (0)