Skip to content

Commit

Permalink
Fix CorruptedBlobStoreRepositoryIT tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <[email protected]>
  • Loading branch information
ashking94 committed Sep 4, 2024
1 parent 4cab651 commit f9b49ed
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public void testHandleSnapshotErrorWithBwCFormat() throws IOException, Execution
// not break subsequent repository operations
logger.info("--> move shard level metadata to new generation");
final IndexId indexId = getRepositoryData(repoName).resolveIndexId(indexName);
final Path shardPath = repoPath.resolve("indices").resolve(indexId.getId()).resolve("0");
final Path shardPath = repoPath.resolve(resolvePath(indexId, "0"));
final Path initialShardMetaPath = shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "0");
assertFileExists(initialShardMetaPath);
Files.move(initialShardMetaPath, shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "1"));
Expand Down Expand Up @@ -487,8 +487,9 @@ public void testRepairBrokenShardGenerations() throws Exception {

logger.info("--> move shard level metadata to new generation and make RepositoryData point at an older generation");
final IndexId indexId = getRepositoryData(repoName).resolveIndexId(indexName);
final Path shardPath = repoPath.resolve("indices").resolve(indexId.getId()).resolve("0");
final Path shardPath = repoPath.resolve(resolvePath(indexId, "0"));
final Path initialShardMetaPath = shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + "0");

assertFileExists(initialShardMetaPath);
Files.move(initialShardMetaPath, shardPath.resolve(BlobStoreRepository.INDEX_FILE_PREFIX + randomIntBetween(1, 1000)));

Expand Down

0 comments on commit f9b49ed

Please sign in to comment.