diff --git a/plugin/build.gradle b/plugin/build.gradle index bcd8fc65c4e..fd0e304ff56 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -86,6 +86,7 @@ dependencies { // sql deps compile project(':x-pack-elasticsearch:sql-clients:jdbc-proto') compile project(':x-pack-elasticsearch:sql-clients:cli-proto') + compile 'org.antlr:antlr4-runtime:4.5.1-1' // common test deps testCompile 'org.elasticsearch:securemock:1.2' diff --git a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/http/HttpCliAction.java b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/http/HttpCliAction.java index 05b72bb799a..18991c58dcf 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/http/HttpCliAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/http/HttpCliAction.java @@ -84,4 +84,9 @@ public class HttpCliAction extends BaseRestHandler { } channel.sendResponse(response); } + + @Override + public String getName() { + return "sql_cli_action"; + } } \ No newline at end of file diff --git a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/http/HttpJdbcAction.java b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/http/HttpJdbcAction.java index 89db54842f4..5c475672350 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/http/HttpJdbcAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/http/HttpJdbcAction.java @@ -85,4 +85,9 @@ public class HttpJdbcAction extends BaseRestHandler { } channel.sendResponse(response); } + + @Override + public String getName() { + return "sql_jdbc_action"; + } } \ No newline at end of file diff --git a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/rest/RestSqlAction.java b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/rest/RestSqlAction.java index 9779c38366e..2bb6c76ae7b 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/rest/RestSqlAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/rest/RestSqlAction.java @@ -58,26 +58,32 @@ public class RestSqlAction extends BaseRestHandler { } channel.sendResponse(response); } -} -class Payload { - static final ObjectParser<Payload, Void> PARSER = new ObjectParser<>("sql/query"); - - static { - PARSER.declareString(Payload::setQuery, new ParseField("query")); + @Override + public String getName() { + return "sql_action"; } - String query; + static class Payload { + static final ObjectParser<Payload, Void> PARSER = new ObjectParser<>("sql/query"); - static Payload from(RestRequest request) throws IOException { - Payload payload = new Payload(); - try (XContentParser parser = request.contentParser()) { - Payload.PARSER.parse(parser, payload, null); + static { + PARSER.declareString(Payload::setQuery, new ParseField("query")); } - return payload; + String query; + + static Payload from(RestRequest request) throws IOException { + Payload payload = new Payload(); + try (XContentParser parser = request.contentParser()) { + Payload.PARSER.parse(parser, payload, null); + } + + return payload; + } + public void setQuery(String query) { + this.query = query; + } } - public void setQuery(String query) { - this.query = query; - } -} \ No newline at end of file +} + diff --git a/sql-clients/cli/build.gradle b/sql-clients/cli/build.gradle index 7356bcbd25e..c98ba18f1b8 100644 --- a/sql-clients/cli/build.gradle +++ b/sql-clients/cli/build.gradle @@ -1,7 +1,8 @@ apply plugin: 'elasticsearch.build' - apply plugin: 'application' +project.compactProfile = 'full' + dependencies { compile "org.jline:jline:3.3.0" @@ -9,6 +10,7 @@ dependencies { compile project(':x-pack-elasticsearch:sql-clients:cli-proto') testCompile project(":x-pack-elasticsearch:transport-client") + testCompile project(':x-pack-elasticsearch:sql-clients:test-utils') } // TODO seems like we should use the jars.... diff --git a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java index 62a71c9eddd..09d775276bf 100644 --- a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java +++ b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Cli.java @@ -5,15 +5,6 @@ */ package org.elasticsearch.xpack.sql.cli; -import java.awt.Desktop; -import java.io.IOException; -import java.io.PrintWriter; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Locale; -import java.util.Properties; - import org.elasticsearch.xpack.sql.cli.net.client.HttpCliClient; import org.elasticsearch.xpack.sql.cli.net.protocol.CommandResponse; import org.elasticsearch.xpack.sql.cli.net.protocol.InfoResponse; @@ -27,6 +18,15 @@ import org.jline.terminal.Terminal; import org.jline.terminal.TerminalBuilder; import org.jline.utils.InfoCmp.Capability; +import java.awt.Desktop; +import java.io.IOException; +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Locale; +import java.util.Properties; + import static java.lang.String.format; public class Cli { diff --git a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Keys.java b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Keys.java index da3a2615909..40a1105d6e0 100644 --- a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Keys.java +++ b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/Keys.java @@ -23,7 +23,7 @@ class Keys { final KeyMap<Key> keys = new KeyMap<>(); - public Keys(Terminal terminal) { + Keys(Terminal terminal) { keys.setNomatch(Key.NONE); keys.setAmbiguousTimeout(400); keys.bind(Key.UP, key(terminal, Capability.key_up)); diff --git a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/HttpCliClient.java b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/HttpCliClient.java index 507e560111b..275e77cf83a 100644 --- a/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/HttpCliClient.java +++ b/sql-clients/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/HttpCliClient.java @@ -24,6 +24,10 @@ import org.elasticsearch.xpack.sql.cli.net.protocol.Proto.Action; import org.elasticsearch.xpack.sql.net.client.util.Bytes; public class HttpCliClient implements AutoCloseable { + @FunctionalInterface + interface DataInputFunction<R> { + R apply(DataInput in) throws IOException; + } private final HttpClient http; private final CliConfiguration cfg; @@ -88,9 +92,4 @@ public class HttpCliClient implements AutoCloseable { } public void close() {} -} - -@FunctionalInterface -interface DataInputFunction<R> { - R apply(DataInput in) throws IOException; } \ No newline at end of file diff --git a/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliHttpServer.java b/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliHttpServer.java index b217d9f1e83..bf0f35dc739 100644 --- a/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliHttpServer.java +++ b/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliHttpServer.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.sql.cli.integration.server; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.sql.net.client.integration.server.ProtoHttpServer; +import org.elasticsearch.xpack.sql.test.server.ProtoHttpServer; public class CliHttpServer extends ProtoHttpServer { diff --git a/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliProtoHandler.java b/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliProtoHandler.java index 0421e4f2bf5..1db30f52b52 100644 --- a/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliProtoHandler.java +++ b/sql-clients/cli/src/test/java/org/elasticsearch/xpack/sql/cli/integration/server/CliProtoHandler.java @@ -12,9 +12,9 @@ import org.elasticsearch.xpack.sql.TestUtils; import org.elasticsearch.xpack.sql.cli.net.protocol.ProtoUtils; import org.elasticsearch.xpack.sql.cli.net.protocol.Request; import org.elasticsearch.xpack.sql.cli.net.protocol.Response; -import org.elasticsearch.xpack.sql.net.client.integration.server.ProtoHandler; import org.elasticsearch.xpack.sql.plugin.cli.http.CliServerProtoUtils; import org.elasticsearch.xpack.sql.plugin.cli.server.CliServer; +import org.elasticsearch.xpack.sql.test.server.ProtoHandler; import java.io.DataInput; import java.io.IOException; diff --git a/sql-clients/jdbc/build.gradle b/sql-clients/jdbc/build.gradle index 3c7035c431f..5f3d70df34a 100644 --- a/sql-clients/jdbc/build.gradle +++ b/sql-clients/jdbc/build.gradle @@ -37,6 +37,7 @@ dependencies { compile project(':x-pack-elasticsearch:sql-clients:jdbc-proto') testCompile project(":x-pack-elasticsearch:transport-client") + testCompile project(':x-pack-elasticsearch:sql-clients:test-utils') testRuntime "com.h2database:h2:1.4.194" testRuntime "net.sourceforge.csvjdbc:csvjdbc:1.0.31" diff --git a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/HttpJdbcClient.java b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/HttpJdbcClient.java index 469e7ebef08..dfd8013a1a8 100644 --- a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/HttpJdbcClient.java +++ b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/HttpJdbcClient.java @@ -38,6 +38,10 @@ import org.elasticsearch.xpack.sql.jdbc.util.BytesArray; import org.elasticsearch.xpack.sql.jdbc.util.FastByteArrayInputStream; public class HttpJdbcClient implements Closeable { + @FunctionalInterface + interface DataInputFunction<R> { + R apply(DataInput in) throws IOException, SQLException; + } private final HttpClient http; private final JdbcConfiguration conCfg; @@ -203,8 +207,3 @@ public class HttpJdbcClient implements Closeable { throw new JdbcException("Invalid response status %08X", header); } } - -@FunctionalInterface -interface DataInputFunction<R> { - R apply(DataInput in) throws IOException, SQLException; -} \ No newline at end of file diff --git a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayInputStream.java b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayInputStream.java index 7bfa990e4a6..3f585fbc34f 100644 --- a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayInputStream.java +++ b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayInputStream.java @@ -35,7 +35,7 @@ public class FastByteArrayInputStream extends InputStream { * position within the buffer by the <code>mark()</code> method. * The current buffer position is set to this point by the * <code>reset()</code> method. - * <p/> + * <p> * If no mark has been set, then the value of mark is the offset * passed to the constructor (or 0 if the offset was not supplied). * @@ -82,7 +82,7 @@ public class FastByteArrayInputStream extends InputStream { * <code>0</code> to <code>255</code>. If no byte is available * because the end of the stream has been reached, the value * <code>-1</code> is returned. - * <p/> + * <p> * This <code>read</code> method * cannot block. * @@ -108,7 +108,7 @@ public class FastByteArrayInputStream extends InputStream { * by <code>System.arraycopy</code>. The * value <code>k</code> is added into <code>pos</code> * and <code>k</code> is returned. - * <p/> + * <p> * This <code>read</code> method cannot block. * * @param b the buffer into which the data is read. @@ -169,7 +169,7 @@ public class FastByteArrayInputStream extends InputStream { /** * Returns the number of remaining bytes that can be read (or skipped over) * from this input stream. - * <p/> + * <p> * The value returned is <code>count - pos</code>, * which is the number of bytes remaining to be read from the input buffer. * @@ -200,11 +200,10 @@ public class FastByteArrayInputStream extends InputStream { * ByteArrayInputStream objects are marked at position zero by * default when constructed. They may be marked at another * position within the buffer by this method. - * <p/> + * <p> * If no mark has been set, then the value of the mark is the * offset passed to the constructor (or 0 if the offset was not * supplied). - * <p/> * <p> Note: The <code>readAheadLimit</code> for this class * has no meaning. * @@ -227,7 +226,6 @@ public class FastByteArrayInputStream extends InputStream { * Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in * this class can be called after the stream has been closed without * generating an <tt>IOException</tt>. - * <p/> */ public void close() {} diff --git a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayOutputStream.java b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayOutputStream.java index f637e1b7ecd..4aff7ed132c 100644 --- a/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayOutputStream.java +++ b/sql-clients/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/util/FastByteArrayOutputStream.java @@ -20,7 +20,7 @@ public class FastByteArrayOutputStream extends OutputStream { /** * Creates a new byte array output stream. The buffer capacity is * initially 1024 bytes, though its size increases if necessary. - * <p/> + * <p> * ES: We use 1024 bytes since we mainly use this to build json/smile * content in memory, and rarely does the 32 byte default in ByteArrayOutputStream fits... */ @@ -33,7 +33,6 @@ public class FastByteArrayOutputStream extends OutputStream { * the specified size, in bytes. * * @param size the initial size. - * @throws EsHadoopIllegalArgumentException if size is negative. */ public FastByteArrayOutputStream(int size) { Assert.isTrue(size >= 0, "Negative initial size: " + size); @@ -56,7 +55,7 @@ public class FastByteArrayOutputStream extends OutputStream { /** * Writes <code>len</code> bytes from the specified byte array * starting at offset <code>off</code> to this byte array output stream. - * <p/> + * <p> * <b>NO checks for bounds, parameters must be ok!</b> * * @param b the data. @@ -118,7 +117,6 @@ public class FastByteArrayOutputStream extends OutputStream { * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in * this class can be called after the stream has been closed without * generating an <tt>IOException</tt>. - * <p/> */ public void close() throws IOException {} } \ No newline at end of file diff --git a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/JdbcHttpServer.java b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/JdbcHttpServer.java index 1fd2d496669..22abdddfe56 100644 --- a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/JdbcHttpServer.java +++ b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/JdbcHttpServer.java @@ -6,7 +6,7 @@ package org.elasticsearch.xpack.sql.jdbc.integration.server; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.sql.net.client.integration.server.ProtoHttpServer; +import org.elasticsearch.xpack.sql.test.server.ProtoHttpServer; public class JdbcHttpServer extends ProtoHttpServer { diff --git a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/SqlProtoHandler.java b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/SqlProtoHandler.java index 9dc96296cd6..dcfa507fd6e 100644 --- a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/SqlProtoHandler.java +++ b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/server/SqlProtoHandler.java @@ -5,19 +5,19 @@ */ package org.elasticsearch.xpack.sql.jdbc.integration.server; -import java.io.DataInput; -import java.io.IOException; +import com.sun.net.httpserver.HttpExchange; import org.elasticsearch.client.Client; import org.elasticsearch.xpack.sql.TestUtils; import org.elasticsearch.xpack.sql.jdbc.net.protocol.ProtoUtils; import org.elasticsearch.xpack.sql.jdbc.net.protocol.Request; import org.elasticsearch.xpack.sql.jdbc.net.protocol.Response; -import org.elasticsearch.xpack.sql.net.client.integration.server.ProtoHandler; import org.elasticsearch.xpack.sql.plugin.jdbc.server.JdbcServer; import org.elasticsearch.xpack.sql.plugin.jdbc.server.JdbcServerProtoUtils; +import org.elasticsearch.xpack.sql.test.server.ProtoHandler; -import com.sun.net.httpserver.HttpExchange; +import java.io.DataInput; +import java.io.IOException; import static org.elasticsearch.action.ActionListener.wrap; diff --git a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/util/EsJdbcServer.java b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/util/EsJdbcServer.java index 0f1d9df970a..0f2a2c6501c 100644 --- a/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/util/EsJdbcServer.java +++ b/sql-clients/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/integration/util/EsJdbcServer.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.sql.jdbc.integration.util; import org.elasticsearch.client.Client; -import org.elasticsearch.xpack.sql.integration.es.LocalEs; import org.elasticsearch.xpack.sql.jdbc.integration.server.JdbcHttpServer; import org.elasticsearch.xpack.sql.jdbc.integration.util.JdbcTemplate.JdbcSupplier; import org.elasticsearch.xpack.sql.jdbc.jdbc.JdbcDriver; @@ -19,15 +18,12 @@ import java.util.Properties; import static org.junit.Assert.assertNotNull; public class EsJdbcServer extends ExternalResource implements JdbcSupplier<Connection> { - - private final LocalEs es; private JdbcHttpServer server; private String jdbcUrl; private JdbcDriver driver; private final Properties properties; public EsJdbcServer(boolean remote, boolean debug) { - es = (remote ? null : new LocalEs()); properties = new Properties(); if (debug) { properties.setProperty("debug", "true"); @@ -44,11 +40,7 @@ public class EsJdbcServer extends ExternalResource implements JdbcSupplier<Conne @Override protected void before() throws Throwable { - if (es != null) { - es.start(); - } - - server = new JdbcHttpServer(es != null ? es.client() : null); + server = new JdbcHttpServer(null); driver = new JdbcDriver(); server.start(0); @@ -59,9 +51,6 @@ public class EsJdbcServer extends ExternalResource implements JdbcSupplier<Conne protected void after() { server.stop(); server = null; - if (es != null) { - es.stop(); - } } public Connection jdbc() throws SQLException { diff --git a/sql-clients/net-client/build.gradle b/sql-clients/net-client/build.gradle index 5b922928902..1a7761cb85f 100644 --- a/sql-clients/net-client/build.gradle +++ b/sql-clients/net-client/build.gradle @@ -1,8 +1,3 @@ apply plugin: 'elasticsearch.build' -description = 'Common base for protos' -// Tests have some testing utilities - -dependencies { - testCompile "org.elasticsearch.client:transport:${version}" -} +description = 'Common base things for protos' diff --git a/sql-clients/test-utils/build.gradle b/sql-clients/test-utils/build.gradle new file mode 100644 index 00000000000..b06aeae3f4d --- /dev/null +++ b/sql-clients/test-utils/build.gradle @@ -0,0 +1,7 @@ +apply plugin: 'elasticsearch.build' + +description = 'Shared test utilities for jdbc and cli' + +dependencies { + compile "org.elasticsearch.client:transport:${version}" +} diff --git a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/IOFunction.java b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java similarity index 83% rename from sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/IOFunction.java rename to sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java index 713f1e4fccf..af53cef839c 100644 --- a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/IOFunction.java +++ b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.sql.net.client.integration.server; +package org.elasticsearch.xpack.sql.test.server; import java.io.IOException; diff --git a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHandler.java b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java similarity index 97% rename from sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHandler.java rename to sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java index ec9584996db..41c42dbd655 100644 --- a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHandler.java +++ b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.sql.net.client.integration.server; +package org.elasticsearch.xpack.sql.test.server; import java.io.DataInput; import java.io.DataInputStream; diff --git a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHttpServer.java b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHttpServer.java similarity index 96% rename from sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHttpServer.java rename to sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHttpServer.java index 901ec269ab4..3af8435d1c5 100644 --- a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/ProtoHttpServer.java +++ b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHttpServer.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.sql.net.client.integration.server; +package org.elasticsearch.xpack.sql.test.server; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/RootHttpHandler.java b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/RootHttpHandler.java similarity index 91% rename from sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/RootHttpHandler.java rename to sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/RootHttpHandler.java index bb04871b371..f7fac0e8c6c 100644 --- a/sql-clients/net-client/src/test/java/org/elasticsearch/xpack/sql/net/client/integration/server/RootHttpHandler.java +++ b/sql-clients/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/RootHttpHandler.java @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -package org.elasticsearch.xpack.sql.net.client.integration.server; +package org.elasticsearch.xpack.sql.test.server; import java.io.IOException;