|
19 | 19 | import org.opensearch.common.settings.Settings;
|
20 | 20 | import org.opensearch.core.util.FileSystemUtils;
|
21 | 21 | import org.opensearch.index.remote.RemoteIndexPath;
|
22 |
| -import org.opensearch.index.remote.RemoteIndexPathUploader; |
23 | 22 | import org.opensearch.index.remote.RemoteStoreEnums;
|
24 | 23 | import org.opensearch.indices.replication.common.ReplicationType;
|
25 | 24 | import org.opensearch.test.InternalTestCluster;
|
@@ -533,17 +532,18 @@ public void testRemoteIndexPathFileExistsAfterMigration() throws Exception {
|
533 | 532 |
|
534 | 533 | // validate remote index path file exists
|
535 | 534 | logger.info("---> Asserting remote index path file exists");
|
536 |
| - String fileNamePrefix = String.join(RemoteIndexPathUploader.DELIMITER, indexUUID, "7", RemoteIndexPath.DEFAULT_VERSION); |
537 | 535 |
|
538 | 536 | assertTrue(FileSystemUtils.exists(translogRepoPath.resolve(RemoteIndexPath.DIR)));
|
539 | 537 | Path[] files = FileSystemUtils.files(translogRepoPath.resolve(RemoteIndexPath.DIR));
|
540 | 538 | assertEquals(1, files.length);
|
541 |
| - assertTrue(Arrays.stream(files).anyMatch(file -> file.toString().contains(fileNamePrefix))); |
| 539 | + logger.info(files[0].toString()); |
| 540 | + assertTrue(Arrays.stream(files).anyMatch(file -> file.toString().contains(indexUUID))); |
542 | 541 |
|
543 | 542 | assertTrue(FileSystemUtils.exists(segmentRepoPath.resolve(RemoteIndexPath.DIR)));
|
544 | 543 | files = FileSystemUtils.files(segmentRepoPath.resolve(RemoteIndexPath.DIR));
|
545 | 544 | assertEquals(1, files.length);
|
546 |
| - assertTrue(Arrays.stream(files).anyMatch(file -> file.toString().contains(fileNamePrefix))); |
| 545 | + logger.info(files[0].toString()); |
| 546 | + assertTrue(Arrays.stream(files).anyMatch(file -> file.toString().contains(indexUUID))); |
547 | 547 | }
|
548 | 548 |
|
549 | 549 | /**
|
|
0 commit comments