fix merge with master
This commit is contained in:
parent
ec93756600
commit
d1ab5dd650
|
@ -10,7 +10,7 @@ import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
|
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
|
||||||
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
import org.elasticsearch.client.AdminClient;
|
import org.elasticsearch.client.AdminClient;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
import org.elasticsearch.client.IndicesAdminClient;
|
import org.elasticsearch.client.IndicesAdminClient;
|
||||||
|
@ -80,7 +80,7 @@ public class DeleteStepTests extends AbstractStepTestCase<DeleteStep> {
|
||||||
Mockito.doAnswer(invocation -> {
|
Mockito.doAnswer(invocation -> {
|
||||||
DeleteIndexRequest request = (DeleteIndexRequest) invocation.getArguments()[0];
|
DeleteIndexRequest request = (DeleteIndexRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<DeleteIndexResponse> listener = (ActionListener<DeleteIndexResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertNotNull(request);
|
assertNotNull(request);
|
||||||
assertEquals(1, request.indices().length);
|
assertEquals(1, request.indices().length);
|
||||||
assertEquals(indexMetaData.getIndex().getName(), request.indices()[0]);
|
assertEquals(indexMetaData.getIndex().getName(), request.indices()[0]);
|
||||||
|
@ -126,7 +126,7 @@ public class DeleteStepTests extends AbstractStepTestCase<DeleteStep> {
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
DeleteIndexRequest request = (DeleteIndexRequest) invocation.getArguments()[0];
|
DeleteIndexRequest request = (DeleteIndexRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<DeleteIndexResponse> listener = (ActionListener<DeleteIndexResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertNotNull(request);
|
assertNotNull(request);
|
||||||
assertEquals(1, request.indices().length);
|
assertEquals(1, request.indices().length);
|
||||||
assertEquals(indexMetaData.getIndex().getName(), request.indices()[0]);
|
assertEquals(indexMetaData.getIndex().getName(), request.indices()[0]);
|
||||||
|
|
|
@ -9,7 +9,7 @@ import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
|
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
|
||||||
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
import org.elasticsearch.client.AdminClient;
|
import org.elasticsearch.client.AdminClient;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
import org.elasticsearch.client.IndicesAdminClient;
|
import org.elasticsearch.client.IndicesAdminClient;
|
||||||
|
@ -251,7 +251,7 @@ public class SetSingleNodeAllocateStepTests extends AbstractStepTestCase<SetSing
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<UpdateSettingsResponse> listener = (ActionListener<UpdateSettingsResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertSettingsRequestContainsValueFrom(request,
|
assertSettingsRequestContainsValueFrom(request,
|
||||||
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_name", validNodeNames, true,
|
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_name", validNodeNames, true,
|
||||||
indexMetaData.getIndex().getName());
|
indexMetaData.getIndex().getName());
|
||||||
|
@ -363,11 +363,11 @@ public class SetSingleNodeAllocateStepTests extends AbstractStepTestCase<SetSing
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<UpdateSettingsResponse> listener = (ActionListener<UpdateSettingsResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertSettingsRequestContainsValueFrom(request,
|
assertSettingsRequestContainsValueFrom(request,
|
||||||
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_name", validNodeNames, true,
|
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_name", validNodeNames, true,
|
||||||
indexMetaData.getIndex().getName());
|
indexMetaData.getIndex().getName());
|
||||||
listener.onResponse(new UpdateSettingsResponse(true));
|
listener.onResponse(new AcknowledgedResponse(true));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
||||||
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions;
|
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions;
|
||||||
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
import org.elasticsearch.client.AdminClient;
|
import org.elasticsearch.client.AdminClient;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
import org.elasticsearch.client.IndicesAdminClient;
|
import org.elasticsearch.client.IndicesAdminClient;
|
||||||
|
@ -92,8 +92,8 @@ public class ShrinkSetAliasStepTests extends AbstractStepTestCase<ShrinkSetAlias
|
||||||
IndicesAliasesRequest request = (IndicesAliasesRequest) invocation.getArguments()[0];
|
IndicesAliasesRequest request = (IndicesAliasesRequest) invocation.getArguments()[0];
|
||||||
assertThat(request.getAliasActions(), equalTo(expectedAliasActions));
|
assertThat(request.getAliasActions(), equalTo(expectedAliasActions));
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<IndicesAliasesResponse> listener = (ActionListener<IndicesAliasesResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
listener.onResponse(new IndicesAliasesResponse(true));
|
listener.onResponse(new AcknowledgedResponse(true));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ public class ShrinkSetAliasStepTests extends AbstractStepTestCase<ShrinkSetAlias
|
||||||
@Override
|
@Override
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<IndicesAliasesResponse> listener = (ActionListener<IndicesAliasesResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
listener.onFailure(exception);
|
listener.onFailure(exception);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
|
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
|
||||||
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
import org.elasticsearch.client.AdminClient;
|
import org.elasticsearch.client.AdminClient;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
import org.elasticsearch.client.IndicesAdminClient;
|
import org.elasticsearch.client.IndicesAdminClient;
|
||||||
|
@ -89,10 +89,10 @@ public class UpdateSettingsStepTests extends AbstractStepTestCase<UpdateSettings
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<UpdateSettingsResponse> listener = (ActionListener<UpdateSettingsResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertThat(request.settings(), equalTo(step.getSettings()));
|
assertThat(request.settings(), equalTo(step.getSettings()));
|
||||||
assertThat(request.indices(), equalTo(new String[] {indexMetaData.getIndex().getName()}));
|
assertThat(request.indices(), equalTo(new String[] {indexMetaData.getIndex().getName()}));
|
||||||
listener.onResponse(new UpdateSettingsResponse(true));
|
listener.onResponse(new AcknowledgedResponse(true));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public class UpdateSettingsStepTests extends AbstractStepTestCase<UpdateSettings
|
||||||
public Void answer(InvocationOnMock invocation) throws Throwable {
|
public Void answer(InvocationOnMock invocation) throws Throwable {
|
||||||
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
UpdateSettingsRequest request = (UpdateSettingsRequest) invocation.getArguments()[0];
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ActionListener<UpdateSettingsResponse> listener = (ActionListener<UpdateSettingsResponse>) invocation.getArguments()[1];
|
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
|
||||||
assertThat(request.settings(), equalTo(step.getSettings()));
|
assertThat(request.settings(), equalTo(step.getSettings()));
|
||||||
assertThat(request.indices(), equalTo(new String[] {indexMetaData.getIndex().getName()}));
|
assertThat(request.indices(), equalTo(new String[] {indexMetaData.getIndex().getName()}));
|
||||||
listener.onFailure(exception);
|
listener.onFailure(exception);
|
||||||
|
|
Loading…
Reference in New Issue