Remove duplicated test (#27091)
This commit is contained in:
parent
559fc5a4de
commit
cf2d0834f5
|
@ -207,39 +207,4 @@ public class RepositoriesIT extends AbstractSnapshotIntegTestCase {
|
||||||
assertThat(ex.getMessage(), containsString("is not shared"));
|
assertThat(ex.getMessage(), containsString("is not shared"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRepositoryVerificationTimeout() throws Exception {
|
|
||||||
Client client = client();
|
|
||||||
|
|
||||||
Settings settings = Settings.builder()
|
|
||||||
.put("location", randomRepoPath())
|
|
||||||
.put("random_control_io_exception_rate", 1.0).build();
|
|
||||||
logger.info("--> creating repository that cannot write any files - should fail");
|
|
||||||
assertThrows(client.admin().cluster().preparePutRepository("test-repo-1")
|
|
||||||
.setType("mock").setSettings(settings),
|
|
||||||
RepositoryVerificationException.class);
|
|
||||||
|
|
||||||
logger.info("--> creating repository that cannot write any files, but suppress verification - should be acked");
|
|
||||||
assertAcked(client.admin().cluster().preparePutRepository("test-repo-1")
|
|
||||||
.setType("mock").setSettings(settings).setVerify(false));
|
|
||||||
|
|
||||||
logger.info("--> verifying repository");
|
|
||||||
assertThrows(client.admin().cluster().prepareVerifyRepository("test-repo-1"), RepositoryVerificationException.class);
|
|
||||||
|
|
||||||
Path location = randomRepoPath();
|
|
||||||
|
|
||||||
logger.info("--> creating repository");
|
|
||||||
try {
|
|
||||||
client.admin().cluster().preparePutRepository("test-repo-1")
|
|
||||||
.setType("mock")
|
|
||||||
.setSettings(Settings.builder()
|
|
||||||
.put("location", location)
|
|
||||||
.put("localize_location", true)
|
|
||||||
).get();
|
|
||||||
fail("RepositoryVerificationException wasn't generated");
|
|
||||||
} catch (RepositoryVerificationException ex) {
|
|
||||||
assertThat(ex.getMessage(), containsString("is not shared"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue