there are testing situations where newly created indices are being wiped before they are fully initialized. This results in an edge-case in the shard-locking strategy where an index cannot be deleted. This should fix that
This commit is contained in:
parent
8b26f59958
commit
f538b30af9
|
@ -292,6 +292,7 @@ public abstract class ESRestTestCase extends ESTestCase {
|
||||||
@After
|
@After
|
||||||
public final void cleanUpCluster() throws Exception {
|
public final void cleanUpCluster() throws Exception {
|
||||||
if (preserveClusterUponCompletion() == false) {
|
if (preserveClusterUponCompletion() == false) {
|
||||||
|
ensureNoInitializingShards();
|
||||||
wipeCluster();
|
wipeCluster();
|
||||||
waitForClusterStateUpdatesToFinish();
|
waitForClusterStateUpdatesToFinish();
|
||||||
logIfThereAreRunningTasks();
|
logIfThereAreRunningTasks();
|
||||||
|
@ -806,7 +807,7 @@ public abstract class ESRestTestCase extends ESTestCase {
|
||||||
request.addParameter("wait_for_no_initializing_shards", "true");
|
request.addParameter("wait_for_no_initializing_shards", "true");
|
||||||
request.addParameter("timeout", "70s");
|
request.addParameter("timeout", "70s");
|
||||||
request.addParameter("level", "shards");
|
request.addParameter("level", "shards");
|
||||||
client().performRequest(request);
|
adminClient().performRequest(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void createIndex(String name, Settings settings) throws IOException {
|
protected static void createIndex(String name, Settings settings) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue