[TEST] No longer randomly block on the index-N files in the

MockRepository, because the getRepositoryData() call depends on it,
which is used in non-synchronized actions such as getting
snapshot status.
This commit is contained in:
Ali Beyad 2017-01-13 15:55:08 -05:00
parent f4270f9914
commit 0c7fc229b8
1 changed files with 3 additions and 1 deletions

View File

@ -269,7 +269,9 @@ public class MockRepository extends FsRepository {
}
}
}
} else {
}
// don't block on the index-N files, as getRepositoryData depends on it
else if (blobName.startsWith("index-") == false) {
if (shouldFail(blobName, randomControlIOExceptionRate) && (incrementAndGetFailureCount() < maximumNumberOfFailures)) {
logger.info("throwing random IOException for file [{}] at path [{}]", blobName, path());
throw new IOException("Random IOException");