Switch SqlGetIndicesAction after merge
Merging picked up a change that starts to migrate away from Streamable and we have to handle it. Original commit: elastic/x-pack-elasticsearch@fa3489e128
This commit is contained in:
parent
2df8b0c144
commit
b8f5720283
|
@ -77,9 +77,8 @@ public class SqlGetIndicesAction
|
|||
this.indices = indices;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
super.readFrom(in);
|
||||
Request(StreamInput in) throws IOException {
|
||||
super(in);
|
||||
indicesOptions = IndicesOptions.readIndicesOptions(in);
|
||||
indices = in.readStringArray();
|
||||
}
|
||||
|
@ -190,7 +189,7 @@ public class SqlGetIndicesAction
|
|||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver, CatalogHolder catalog, SqlLicenseChecker licenseChecker) {
|
||||
super(settings, NAME, transportService, clusterService, threadPool, actionFilters,
|
||||
indexNameExpressionResolver, Request::new);
|
||||
Request::new, indexNameExpressionResolver);
|
||||
this.catalogSupplier = catalog.catalogSupplier;
|
||||
this.licenseChecker = licenseChecker;
|
||||
}
|
||||
|
|
|
@ -6,16 +6,17 @@
|
|||
package org.elasticsearch.xpack.sql.plugin;
|
||||
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.Writeable.Reader;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.test.AbstractStreamableTestCase;
|
||||
import org.elasticsearch.test.EqualsHashCodeTestUtils.MutateFunction;
|
||||
import org.elasticsearch.test.AbstractWireSerializingTestCase;
|
||||
import org.elasticsearch.xpack.sql.plugin.SqlGetIndicesAction.Request;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class SqlGetIndicesRequestTests extends AbstractStreamableTestCase<SqlGetIndicesAction.Request> {
|
||||
public class SqlGetIndicesRequestTests extends AbstractWireSerializingTestCase<SqlGetIndicesAction.Request> {
|
||||
@Override
|
||||
protected Request createTestInstance() {
|
||||
Request request = new Request(randomIndicesOptions(), randomIndices());
|
||||
|
@ -26,16 +27,12 @@ public class SqlGetIndicesRequestTests extends AbstractStreamableTestCase<SqlGet
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Request createBlankInstance() {
|
||||
return new Request();
|
||||
protected Reader<Request> instanceReader() {
|
||||
return Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MutateFunction<Request> getMutateFunction() {
|
||||
return SqlGetIndicesRequestTests::mutate;
|
||||
}
|
||||
|
||||
private static Request mutate(Request request) {
|
||||
protected Request mutateInstance(Request request) throws IOException {
|
||||
@SuppressWarnings("unchecked")
|
||||
Supplier<Request> supplier = randomFrom(
|
||||
() -> {
|
||||
|
|
Loading…
Reference in New Issue