Skip to content

Commit f9b49ed

Browse files
committed
Fix CorruptedBlobStoreRepositoryIT tests
Signed-off-by: Ashish Singh <[email protected]>
1 parent 4cab651 commit f9b49ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/internalClusterTest/java/org/opensearch/snapshots/CorruptedBlobStoreRepositoryIT.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public void testHandleSnapshotErrorWithBwCFormat() throws IOException, Execution
458458
// not break subsequent repository operations
459459
logger.info("--> move shard level metadata to new generation");
460460
final IndexId indexId = getRepositoryData(repoName).resolveIndexId(indexName);
461-
final Path shardPath = repoPath.resolve("indices").resolve(indexId.getId()).resolve("0");
461+
final Path shardPath = repoPath.resolve(resolvePath(indexId, "0"));
462462
final Path initialShardMetaPath = shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "0");
463463
assertFileExists(initialShardMetaPath);
464464
Files.move(initialShardMetaPath, shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "1"));
@@ -487,8 +487,9 @@ public void testRepairBrokenShardGenerations() throws Exception {
487487

488488
logger.info("--> move shard level metadata to new generation and make RepositoryData point at an older generation");
489489
final IndexId indexId = getRepositoryData(repoName).resolveIndexId(indexName);
490-
final Path shardPath = repoPath.resolve("indices").resolve(indexId.getId()).resolve("0");
490+
final Path shardPath = repoPath.resolve(resolvePath(indexId, "0"));
491491
final Path initialShardMetaPath = shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "0");
492+
492493
assertFileExists(initialShardMetaPath);
493494
Files.move(initialShardMetaPath, shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + randomIntBetween(1, 1000)));
494495

0 commit comments

Comments
 (0)