Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions testing/trino-product-tests-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,19 @@
<artifactId>testcontainers</artifactId>
</dependency>

<dependency>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
<version>2.6.32</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
Expand All @@ -172,6 +185,20 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.3</version>
<classifier>standalone</classifier>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-jdbc</artifactId>
Expand All @@ -193,6 +220,24 @@

<build>
<plugins>
<plugin>
<groupId>org.basepom.maven</groupId>
<artifactId>duplicate-finder-maven-plugin</artifactId>
<configuration>
<ignoredDependencies>
<dependency>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
</dependency>
</ignoredDependencies>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down Expand Up @@ -254,6 +299,21 @@
<type>jar</type>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<classifier>standalone</classifier>
<type>jar</type>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>hive-jdbc.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc</artifactId>
<type>jar</type>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>databricks-jdbc.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import io.trino.tests.product.launcher.env.EnvironmentProvider;
import io.trino.tests.product.launcher.env.common.Standard;

import java.io.File;

import static io.trino.tests.product.launcher.env.EnvironmentContainers.COORDINATOR;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.TESTS;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.configureTempto;
Expand All @@ -33,6 +35,8 @@
public abstract class AbstractSinglenodeDeltaLakeDatabricks
extends EnvironmentProvider
{
private static final File DATABRICKS_JDBC_PROVIDER = new File("testing/trino-product-tests-launcher/target/databricks-jdbc.jar");

private final DockerFiles dockerFiles;

abstract String databricksTestJdbcUrl();
Expand Down Expand Up @@ -69,7 +73,10 @@ public void extendEnvironment(Environment.Builder builder)
.withEnv("AWS_REGION", awsRegion)
.withEnv("DATABRICKS_JDBC_URL", databricksTestJdbcUrl)
.withEnv("DATABRICKS_LOGIN", databricksTestLogin)
.withEnv("DATABRICKS_TOKEN", databricksTestToken));
.withEnv("DATABRICKS_TOKEN", databricksTestToken)
.withCopyFileToContainer(
forHostPath(DATABRICKS_JDBC_PROVIDER.getAbsolutePath()),
"/docker/jdbc/databricks-jdbc.jar"));

configureTempto(builder, configDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import io.trino.tests.product.launcher.env.common.Standard;
import io.trino.tests.product.launcher.env.common.TestsEnvironment;
import io.trino.tests.product.launcher.testcontainers.PortBinder;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy;

import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -55,6 +57,8 @@
public class EnvSinglenodeDeltaLakeOss
extends EnvironmentProvider
{
private static final File HIVE_JDBC_PROVIDER = new File("testing/trino-product-tests-launcher/target/hive-jdbc.jar");

private static final int SPARK_THRIFT_PORT = 10213;

private static final String SPARK_CONTAINER_NAME = "spark";
Expand Down Expand Up @@ -92,7 +96,9 @@ public void extendEnvironment(Environment.Builder builder)
CONTAINER_TRINO_ETC + "/catalog/delta.properties");

builder.configureContainer(TESTS, dockerContainer -> {
dockerContainer.withEnv("S3_BUCKET", S3_BUCKET_NAME);
dockerContainer.withEnv("S3_BUCKET", S3_BUCKET_NAME)
// Binding instead of copying for avoiding OutOfMemoryError https://github.com/testcontainers/testcontainers-java/issues/2863
.withFileSystemBind(HIVE_JDBC_PROVIDER.getParent(), "/docker/jdbc", BindMode.READ_ONLY);
});

builder.addContainer(createSparkContainer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ databases:
jdbc_user: root
delta:
jdbc_driver_class: com.databricks.client.jdbc.Driver
jdbc_jar: /docker/jdbc/databricks-jdbc.jar
schema: default
prepare_statement:
- USE ${databases.delta.schema}
Expand Down
16 changes: 0 additions & 16 deletions testing/trino-product-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
<artifactId>java-driver-core</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -110,11 +104,6 @@
<artifactId>units</artifactId>
</dependency>

<dependency>
<groupId>io.airlift.resolver</groupId>
<artifactId>resolver</artifactId>
</dependency>

<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
Expand Down Expand Up @@ -239,11 +228,6 @@
<artifactId>annotations</artifactId>
</dependency>

<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-api</artifactId>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.time.temporal.ChronoUnit;

import static io.trino.tempto.context.ThreadLocalTestContextHolder.testContext;
import static io.trino.tests.product.utils.DeltaQueryExecutors.createDeltaQueryExecutor;
import static io.trino.tests.product.utils.HadoopTestUtils.ERROR_COMMITTING_WRITE_TO_HIVE_RETRY_POLICY;

public final class QueryExecutors
Expand Down Expand Up @@ -127,7 +126,7 @@ public static QueryExecutor onDelta()

return new QueryExecutor()
{
private final QueryExecutor delegate = createDeltaQueryExecutor(testContext());
private final QueryExecutor delegate = testContext().getDependency(QueryExecutor.class, "delta");

@Override
public QueryResult executeQuery(String sql, QueryParam... params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ databases:

delta:
jdbc_driver_class: org.apache.hive.jdbc.HiveDriver
jdbc_jar: /docker/jdbc/hive-jdbc.jar
schema: default
prepare_statement:
- USE ${databases.delta.schema}
Expand Down