[TEST] move test to a different class that can disable publish timeout on demand
This commit is contained in:
parent
c524e469ec
commit
bc563931c3
|
@ -22,6 +22,8 @@ package org.elasticsearch.cluster.ack;
|
|||
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
|
||||
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
|
||||
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
|
||||
import org.elasticsearch.action.admin.indices.close.CloseIndexResponse;
|
||||
import org.elasticsearch.action.admin.indices.open.OpenIndexResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
|
@ -140,4 +142,17 @@ public class AckClusterUpdateSettingsTests extends ElasticsearchIntegrationTest
|
|||
private static ClusterState getLocalClusterState(Client client) {
|
||||
return client.admin().cluster().prepareState().setLocal(true).get().getState();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenIndexNoAcknowledgement() {
|
||||
createIndex("test");
|
||||
ensureGreen();
|
||||
removePublishTimeout();
|
||||
CloseIndexResponse closeIndexResponse = client().admin().indices().prepareClose("test").execute().actionGet();
|
||||
assertThat(closeIndexResponse.isAcknowledged(), equalTo(true));
|
||||
|
||||
OpenIndexResponse openIndexResponse = client().admin().indices().prepareOpen("test").setTimeout("0s").get();
|
||||
assertThat(openIndexResponse.isAcknowledged(), equalTo(false));
|
||||
ensureGreen("test"); // make sure that recovery from disk has completed, so that check index doesn't fail.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,19 +394,6 @@ public class AckTests extends ElasticsearchIntegrationTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenIndexNoAcknowledgement() {
|
||||
createIndex("test");
|
||||
ensureGreen();
|
||||
|
||||
CloseIndexResponse closeIndexResponse = client().admin().indices().prepareClose("test").execute().actionGet();
|
||||
assertThat(closeIndexResponse.isAcknowledged(), equalTo(true));
|
||||
|
||||
OpenIndexResponse openIndexResponse = client().admin().indices().prepareOpen("test").setTimeout("0s").get();
|
||||
assertThat(openIndexResponse.isAcknowledged(), equalTo(false));
|
||||
ensureGreen("test"); // make sure that recovery from disk has completed, so that check index doesn't fail.
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPutMappingAcknowledgement() {
|
||||
createIndex("test");
|
||||
|
|
Loading…
Reference in New Issue