Reenable this test since it was fixed by #45689 in production code (specifically, the fact that we write the `snap-` blobs without overwrite checks now). Only required adding the assumed blocking on index file writes to test code to properly work again. * Closes #25281
This commit is contained in:
parent
b00de8edf3
commit
2c70d403fc
|
@ -933,7 +933,6 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTest
|
|||
}
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/25281")
|
||||
public void testMasterShutdownDuringFailedSnapshot() throws Exception {
|
||||
logger.info("--> starting two master nodes and two data nodes");
|
||||
internalCluster().startMasterOnlyNodes(2);
|
||||
|
|
|
@ -369,6 +369,9 @@ public class MockRepository extends FsRepository {
|
|||
public void writeBlobAtomic(final String blobName, final InputStream inputStream, final long blobSize,
|
||||
final boolean failIfAlreadyExists) throws IOException {
|
||||
final Random random = RandomizedContext.current().getRandom();
|
||||
if (blobName.startsWith("index-") && blockOnWriteIndexFile) {
|
||||
blockExecutionAndFail(blobName);
|
||||
}
|
||||
if ((delegate() instanceof FsBlobContainer) && (random.nextBoolean())) {
|
||||
// Simulate a failure between the write and move operation in FsBlobContainer
|
||||
final String tempBlobName = FsBlobContainer.tempBlobName(blobName);
|
||||
|
|
Loading…
Reference in New Issue