Expanding the JDBC testing framework

Original commit: elastic/x-pack-elasticsearch@cc31f7b6a9
This commit is contained in:
Costin Leau 2017-07-01 17:18:27 +03:00
parent 16ea84defe
commit bc9c9a9151
14 changed files with 15 additions and 11 deletions

View File

@ -51,7 +51,7 @@ dependencies {
// Used by the hack to run InternalTestCluster if not running against a gradle-started cluster.
testCompile project(path: ':modules:lang-painless', configuration: 'runtime')
testRuntime "com.h2database:h2:1.4.194"
testRuntime "com.h2database:org.elasticsearch.xpack.sql.jdbc.h2:1.4.194"
testRuntime "net.sourceforge.csvjdbc:csvjdbc:1.0.31"
}

View File

@ -5,6 +5,8 @@
*/
package org.elasticsearch.xpack.sql.jdbc;
import org.elasticsearch.xpack.sql.jdbc.framework.JdbcIntegrationTestCase;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;

View File

@ -5,6 +5,8 @@
*/
package org.elasticsearch.xpack.sql.jdbc;
import org.elasticsearch.xpack.sql.jdbc.framework.JdbcIntegrationTestCase;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;

View File

@ -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.jdbc;
package org.elasticsearch.xpack.sql.jdbc.framework;
import org.apache.http.HttpEntity;
import org.apache.http.entity.ContentType;

View File

@ -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.jdbc;
package org.elasticsearch.xpack.sql.jdbc.framework;
import org.elasticsearch.common.CheckedConsumer;
import org.elasticsearch.common.CheckedFunction;

View File

@ -20,7 +20,7 @@ import static org.junit.Assert.assertNotNull;
@RunWith(Suite.class)
public abstract class SqlInfraSuite extends EsInfra {
private static String REMOTE_H2 = "jdbc:h2:tcp://localhost/./essql";
private static String REMOTE_H2 = "jdbc:org.elasticsearch.xpack.sql.jdbc.h2:tcp://localhost/./essql";
@ClassRule
public static H2 H2 = new H2(null);
@ -35,7 +35,7 @@ public abstract class SqlInfraSuite extends EsInfra {
}
private static void setupH2() throws Exception {
h2().execute("RUNSCRIPT FROM 'classpath:org/elasticsearch/sql/jdbc/integration/h2-setup.sql'");
h2().execute("RUNSCRIPT FROM 'classpath:org/elasticsearch/sql/jdbc/integration/org.elasticsearch.xpack.sql.jdbc.h2-setup.sql'");
}
public static Supplier<Connection> h2Con() {

View File

@ -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.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

View File

@ -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.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

View File

@ -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.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

View File

@ -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.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

View File

@ -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.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;

View File

@ -7,4 +7,4 @@
/**
* Tests comparing our jdbc client to H2's jdbc client.
*/
package org.elasticsearch.xpack.sql.jdbc.compare;
package org.elasticsearch.xpack.sql.jdbc.h2;