From 8e6c9c53bf6a2406a01fb5adcfc2b2fc59f19df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Wed, 8 Jun 2022 18:36:34 +0200 Subject: [PATCH] Move fault tolerant tests to separate module Commit moves fault tolerant tests out of trino-hive, trino-iceberg, trino-delta to new trino-faulttolerant-test module. With fault tolerance tests in connector plugins those need to depend (in test scope) on trino-exchange-filesystem. This proved to be a problem and resulted in influencing compile classpath of plugins in a way that connectors were failing at runtime (some needed transitive dependecies were rescoped from compile to test). See: https://github.com/trinodb/trino/issues/12674 --- .github/workflows/ci.yml | 9 +- plugin/trino-delta-lake/pom.xml | 72 --- plugin/trino-hive/pom.xml | 77 --- .../plugin/hive/BaseHiveConnectorTest.java | 10 +- .../plugin/hive/TestHiveConnectorTest.java | 2 +- plugin/trino-iceberg/pom.xml | 59 --- pom.xml | 14 + testing/trino-faulttolerant-tests/pom.xml | 471 ++++++++++++++++++ .../src/main/java/io/trino/tests/Dummy.java | 20 + .../BaseFailureRecoveryTest.java | 6 +- .../delta}/BaseDeltaFailureRecoveryTest.java | 4 +- .../TestDeltaTaskFailureRecoveryTest.java | 5 +- .../hive/BaseHiveFailureRecoveryTest.java | 4 +- ...iveFaultTolerantExecutionAggregations.java | 3 +- ...veFaultTolerantExecutionConnectorTest.java | 11 +- ...HiveFaultTolerantExecutionJoinQueries.java | 3 +- ...eFaultTolerantExecutionOrderByQueries.java | 3 +- ...veFaultTolerantExecutionWindowQueries.java | 3 +- .../TestHiveQueryFailureRecoveryTest.java | 2 +- .../hive/TestHiveTaskFailureRecoveryTest.java | 2 +- .../BaseIcebergFailureRecoveryTest.java | 4 +- .../TestIcebergQueryFailureRecoveryTest.java | 3 +- .../TestIcebergTaskFailureRecoveryTest.java | 3 +- 23 files changed, 550 insertions(+), 240 deletions(-) create mode 100644 testing/trino-faulttolerant-tests/pom.xml create mode 100644 testing/trino-faulttolerant-tests/src/main/java/io/trino/tests/Dummy.java rename testing/{trino-testing/src/main/java/io/trino/testing => trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/BaseFailureRecoveryTest.java (99%) rename {plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta}/BaseDeltaFailureRecoveryTest.java (99%) rename {plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta}/TestDeltaTaskFailureRecoveryTest.java (94%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/BaseHiveFailureRecoveryTest.java (98%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveFaultTolerantExecutionAggregations.java (96%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveFaultTolerantExecutionConnectorTest.java (88%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveFaultTolerantExecutionJoinQueries.java (96%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveFaultTolerantExecutionOrderByQueries.java (96%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveFaultTolerantExecutionWindowQueries.java (96%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveQueryFailureRecoveryTest.java (99%) rename {plugin/trino-hive/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/hive/TestHiveTaskFailureRecoveryTest.java (99%) rename {plugin/trino-iceberg/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/iceberg/BaseIcebergFailureRecoveryTest.java (99%) rename {plugin/trino-iceberg/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/iceberg/TestIcebergQueryFailureRecoveryTest.java (96%) rename {plugin/trino-iceberg/src/test/java/io/trino/plugin => testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant}/iceberg/TestIcebergTaskFailureRecoveryTest.java (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 583ad114aeaa..551dd385769a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -310,6 +310,7 @@ jobs: $MAVEN test ${MAVEN_TEST} -pl ' !:trino-main, !:trino-tests, + !:trino-faulttolerant-tests, !:trino-raptor-legacy, !:trino-accumulo, !:trino-cassandra, @@ -383,16 +384,17 @@ jobs: include: - { modules: core/trino-main } - { modules: testing/trino-tests } + - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-hive-1 } + - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-hive-2 } + - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-delta } + - { modules: testing/trino-faulttolerant-tests, profile: test-fault-tolerant-iceberg } - { modules: plugin/trino-raptor-legacy } - { modules: plugin/trino-accumulo } - { modules: plugin/trino-cassandra } - { modules: plugin/trino-clickhouse } - { modules: plugin/trino-delta-lake } - - { modules: plugin/trino-delta-lake, profile: test-failure-recovery } - { modules: plugin/trino-hive } - { modules: plugin/trino-hive, profile: test-parquet } - - { modules: plugin/trino-hive, profile: test-failure-recovery } - - { modules: plugin/trino-hive, profile: test-fault-tolerant-execution } - { modules: plugin/trino-elasticsearch } - { modules: plugin/trino-elasticsearch, profile: test-stats } - { modules: plugin/trino-mongodb } @@ -408,7 +410,6 @@ jobs: - { modules: plugin/trino-kudu } - { modules: plugin/trino-druid } - { modules: plugin/trino-iceberg } - - { modules: plugin/trino-iceberg, profile: test-failure-recovery } - { modules: [ plugin/trino-phoenix, plugin/trino-phoenix5 ] } - { modules: [ client/trino-jdbc, plugin/trino-base-jdbc, plugin/trino-thrift, plugin/trino-memory ] } - { modules: plugin/trino-bigquery } diff --git a/plugin/trino-delta-lake/pom.xml b/plugin/trino-delta-lake/pom.xml index 650984897b39..ff200e129173 100644 --- a/plugin/trino-delta-lake/pom.xml +++ b/plugin/trino-delta-lake/pom.xml @@ -201,45 +201,6 @@ - - io.trino - trino-exchange-filesystem - test - - - com.google.apis - google-api-services-storage - - - com.google.api-client - google-api-client - - - com.google.auto.value - auto-value-annotations - - - com.google.code.gson - gson - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-jackson2 - - - - - - io.trino - trino-exchange-filesystem - test-jar - test - - io.trino trino-hive @@ -349,18 +310,6 @@ azure-storage-blob 12.14.4 test - - - - io.netty - netty-transport-classes-epoll - - - - io.netty - netty-transport-native-epoll - - @@ -431,7 +380,6 @@ **/TestDeltaLakeAdlsConnectorSmokeTest.java **/TestDeltaLakeGlueMetastore.java **/TestDeltaLakeCleanUpGlueMetastore.java - **/TestDelta*FailureRecoveryTest.java **/TestDeltaLakeSharedGlueMetastoreWithTableRedirections.java @@ -484,25 +432,5 @@ - - - test-failure-recovery - - - - org.apache.maven.plugins - maven-surefire-plugin - - - 4 - - **/TestDelta*FailureRecoveryTest.java - - - - - - - diff --git a/plugin/trino-hive/pom.xml b/plugin/trino-hive/pom.xml index 6bc228c46ca7..c8ac7d4b575b 100644 --- a/plugin/trino-hive/pom.xml +++ b/plugin/trino-hive/pom.xml @@ -319,45 +319,6 @@ test - - io.trino - trino-exchange-filesystem - test - - - com.google.apis - google-api-services-storage - - - com.google.api-client - google-api-client - - - com.google.auto.value - auto-value-annotations - - - com.google.code.gson - gson - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-jackson2 - - - - - - io.trino - trino-exchange-filesystem - test-jar - test - - io.trino trino-main @@ -472,8 +433,6 @@ **/TestHiveGlueMetastore.java **/TestFullParquetReader.java - **/TestHive*FailureRecoveryTest.java - **/TestHiveFaultTolerantExecution*.java @@ -525,41 +484,5 @@ - - - test-failure-recovery - - - - org.apache.maven.plugins - maven-surefire-plugin - - - 4 - - **/TestHive*FailureRecoveryTest.java - - - - - - - - - test-fault-tolerant-execution - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/TestHiveFaultTolerantExecution*.java - - - - - - diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java index f94dac8ceb1f..f3a2a5079b3f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveConnectorTest.java @@ -31,7 +31,6 @@ import io.trino.metadata.QualifiedObjectName; import io.trino.metadata.TableHandle; import io.trino.metadata.TableMetadata; -import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.spi.connector.CatalogSchemaTableName; import io.trino.spi.connector.ColumnHandle; import io.trino.spi.connector.ColumnMetadata; @@ -185,17 +184,12 @@ protected BaseHiveConnectorTest() this.bucketedSession = createBucketedSession(Optional.of(new SelectedRole(ROLE, Optional.of("admin")))); } - protected static QueryRunner createHiveQueryRunner(Map extraProperties, Map exchangeManagerProperties) + protected static QueryRunner createHiveQueryRunner(Map extraProperties, Consumer additionalSetup) throws Exception { DistributedQueryRunner queryRunner = HiveQueryRunner.builder() .setExtraProperties(extraProperties) - .setAdditionalSetup(runner -> { - if (!exchangeManagerProperties.isEmpty()) { - runner.installPlugin(new FileSystemExchangePlugin()); - runner.loadExchangeManager("filesystem", exchangeManagerProperties); - } - }) + .setAdditionalSetup(additionalSetup) .setHiveProperties(ImmutableMap.of( "hive.allow-register-partition-procedure", "true", // Reduce writer sort buffer size to ensure SortingFileWriter gets used diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java index 4477a56d0056..2cd38bab7748 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorTest.java @@ -23,6 +23,6 @@ public class TestHiveConnectorTest protected QueryRunner createQueryRunner() throws Exception { - return BaseHiveConnectorTest.createHiveQueryRunner(ImmutableMap.of(), ImmutableMap.of()); + return BaseHiveConnectorTest.createHiveQueryRunner(ImmutableMap.of(), runner -> {}); } } diff --git a/plugin/trino-iceberg/pom.xml b/plugin/trino-iceberg/pom.xml index 774075cf6f02..7b59d3e29869 100644 --- a/plugin/trino-iceberg/pom.xml +++ b/plugin/trino-iceberg/pom.xml @@ -273,45 +273,6 @@ - - io.trino - trino-exchange-filesystem - test - - - com.google.apis - google-api-services-storage - - - com.google.api-client - google-api-client - - - com.google.auto.value - auto-value-annotations - - - com.google.code.gson - gson - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-jackson2 - - - - - - io.trino - trino-exchange-filesystem - test-jar - test - - io.trino trino-hive @@ -443,7 +404,6 @@ maven-surefire-plugin - **/TestIceberg*FailureRecoveryTest.java **/TestIcebergGlueCatalogConnectorSmokeTest.java **/TestTrinoGlueCatalogTest.java **/TestSharedGlueMetastore.java @@ -456,25 +416,6 @@ - - test-failure-recovery - - - - org.apache.maven.plugins - maven-surefire-plugin - - - 4 - - **/TestIceberg*FailureRecoveryTest.java - - - - - - - test-glue-catalog diff --git a/pom.xml b/pom.xml index f4fb496ef466..2ed7989a3561 100644 --- a/pom.xml +++ b/pom.xml @@ -160,6 +160,7 @@ service/trino-verifier testing/trino-benchmark testing/trino-benchto-benchmarks + testing/trino-faulttolerant-tests testing/trino-plugin-reader testing/trino-product-tests testing/trino-product-tests-launcher @@ -278,6 +279,12 @@ ${project.version} + + io.trino + trino-faulttolerant-tests + ${project.version} + + io.trino trino-geospatial @@ -315,6 +322,13 @@ ${project.version} + + io.trino + trino-iceberg + test-jar + ${project.version} + + io.trino trino-jdbc diff --git a/testing/trino-faulttolerant-tests/pom.xml b/testing/trino-faulttolerant-tests/pom.xml new file mode 100644 index 000000000000..44effcee294d --- /dev/null +++ b/testing/trino-faulttolerant-tests/pom.xml @@ -0,0 +1,471 @@ + + + 4.0.0 + + + io.trino + trino-root + 386-SNAPSHOT + ../../pom.xml + + + trino-faulttolerant-tests + trino-faulttolerant-tests + + + ${project.parent.basedir} + + + + + + io.airlift + concurrent + runtime + + + + io.airlift + configuration + runtime + + + + io.airlift + http-client + runtime + + + + io.airlift + json + runtime + + + + io.airlift + log + runtime + + + + io.airlift + log-manager + runtime + + + + io.airlift + node + runtime + + + + io.airlift + units + runtime + + + + com.google.code.findbugs + jsr305 + runtime + + + + com.google.guava + guava + runtime + + + + com.google.inject + guice + runtime + + + + com.h2database + h2 + runtime + + + + javax.inject + javax.inject + runtime + + + + javax.ws.rs + javax.ws.rs-api + runtime + + + + junit + junit + runtime + + + + org.jetbrains + annotations + provided + + + + io.trino + trino-base-jdbc + test + + + + io.trino + trino-base-jdbc + test-jar + test + + + + io.trino + trino-blackhole + test + + + + io.trino + trino-client + test + + + + io.trino + trino-delta-lake + test + + + + io.trino + trino-delta-lake + test-jar + test + + + + io.trino + trino-exchange-filesystem + test + + + + io.trino + trino-exchange-filesystem + test-jar + test + + + + io.trino + trino-hive + test + + + org.alluxio + alluxio-shaded-client + + + + + + io.trino + trino-hive + test-jar + test + + + org.alluxio + alluxio-shaded-client + + + + + + io.trino + trino-iceberg + test + + + + org.apache.commons + commons-lang3 + + + + + + io.trino + trino-iceberg + test-jar + test + + + + org.apache.commons + commons-lang3 + + + + + + io.trino + trino-main + test + + + + io.trino + trino-main + test-jar + test + + + + io.trino + trino-memory + test + + + + io.trino + trino-memory + test-jar + test + + + + io.trino + trino-plugin-toolkit + test + + + + io.trino + trino-resource-group-managers + test + + + + io.trino + trino-resource-group-managers + test-jar + test + + + + io.trino + trino-spi + test + + + + io.trino + trino-testing + test + + + + io.trino + trino-testing-containers + test + + + + io.trino + trino-testing-services + test + + + + io.trino + trino-tpcds + test + + + + io.trino + trino-tpch + test + + + + io.trino.tpch + tpch + test + + + + io.airlift + bootstrap + test + + + + io.airlift + testing + test + + + + com.squareup.okhttp3 + okhttp + test + + + + joda-time + joda-time + test + + + + org.assertj + assertj-core + test + + + + + org.openjdk.jmh + jmh-core + test + + + + org.openjdk.jmh + jmh-generator-annprocess + test + + + + org.testng + testng + test + + + + + + + org.basepom.maven + duplicate-finder-maven-plugin + + + + mime.types + about.html + + + + + + + + + + default + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/io/trino/faulttolerant/Test*.java + + + + + + + + + test-fault-tolerant-hive-1 + + + + org.apache.maven.plugins + maven-surefire-plugin + + + 4 + + **/io/trino/faulttolerant/hive/*FailureRecoveryTest.java + + + + + + + + + test-fault-tolerant-hive-2 + + + + org.apache.maven.plugins + maven-surefire-plugin + + + 4 + + **/io/trino/faulttolerant/hive/Test*FaultTolerant*.java + + + + + + + + + test-fault-tolerant-delta + + + + org.apache.maven.plugins + maven-surefire-plugin + + + 4 + + **/io/trino/faulttolerant/delta/Test*.java + + + + + + + + + test-fault-tolerant-iceberg + + + + org.apache.maven.plugins + maven-surefire-plugin + + + 4 + + **/io/trino/faulttolerant/iceberg/Test*.java + + + + + + + + diff --git a/testing/trino-faulttolerant-tests/src/main/java/io/trino/tests/Dummy.java b/testing/trino-faulttolerant-tests/src/main/java/io/trino/tests/Dummy.java new file mode 100644 index 000000000000..a1c14296db90 --- /dev/null +++ b/testing/trino-faulttolerant-tests/src/main/java/io/trino/tests/Dummy.java @@ -0,0 +1,20 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.trino.tests; + +public class Dummy +{ + // This class is here so that maven produces a source and javadoc artifact, which are + // needed by Sonatype in order to publish a release +} diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/BaseFailureRecoveryTest.java similarity index 99% rename from testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/BaseFailureRecoveryTest.java index 4693e34a2407..1c7c6cc20850 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/BaseFailureRecoveryTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.testing; +package io.trino.faulttolerant; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -27,6 +27,10 @@ import io.trino.server.DynamicFilterService.DynamicFiltersStats; import io.trino.spi.ErrorType; import io.trino.spi.QueryId; +import io.trino.testing.AbstractTestQueryFramework; +import io.trino.testing.MaterializedResult; +import io.trino.testing.QueryRunner; +import io.trino.testing.ResultWithQueryId; import io.trino.tpch.TpchTable; import org.assertj.core.api.AbstractThrowableAssert; import org.intellij.lang.annotations.Language; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/BaseDeltaFailureRecoveryTest.java similarity index 99% rename from plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/BaseDeltaFailureRecoveryTest.java index bf426c5f10f8..dcc547425f42 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/BaseDeltaFailureRecoveryTest.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.deltalake; +package io.trino.faulttolerant.delta; +import io.trino.faulttolerant.BaseFailureRecoveryTest; import io.trino.operator.RetryPolicy; import io.trino.spi.ErrorType; -import io.trino.testing.BaseFailureRecoveryTest; import org.testng.annotations.Test; import java.util.List; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaTaskFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/TestDeltaTaskFailureRecoveryTest.java similarity index 94% rename from plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaTaskFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/TestDeltaTaskFailureRecoveryTest.java index d282e55131ff..3799a66a698d 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaTaskFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/delta/TestDeltaTaskFailureRecoveryTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.deltalake; +package io.trino.faulttolerant.delta; import com.google.common.collect.ImmutableMap; import io.trino.operator.RetryPolicy; @@ -27,6 +27,7 @@ import static io.trino.plugin.deltalake.DeltaLakeDockerizedMinioDataLake.createDockerizedMinioDataLakeForDeltaLake; import static io.trino.plugin.deltalake.DeltaLakeQueryRunner.DELTA_CATALOG; +import static io.trino.plugin.deltalake.DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner; import static io.trino.plugin.exchange.filesystem.containers.MinioStorage.getExchangeManagerProperties; import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; @@ -54,7 +55,7 @@ protected QueryRunner createQueryRunner( MinioStorage minioStorage = closeAfterClass(new MinioStorage("test-exchange-spooling-" + randomTableSuffix())); minioStorage.start(); - DistributedQueryRunner queryRunner = DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner( + DistributedQueryRunner queryRunner = createS3DeltaLakeQueryRunner( DELTA_CATALOG, SCHEMA, configProperties, diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/BaseHiveFailureRecoveryTest.java similarity index 98% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/BaseHiveFailureRecoveryTest.java index 0facd0d56c75..d7e217306657 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/BaseHiveFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/BaseHiveFailureRecoveryTest.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.Session; +import io.trino.faulttolerant.BaseFailureRecoveryTest; import io.trino.operator.RetryPolicy; -import io.trino.testing.BaseFailureRecoveryTest; import org.testng.annotations.Test; import java.util.List; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionAggregations.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionAggregations.java similarity index 96% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionAggregations.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionAggregations.java index 54531a82f6a2..8f331c4547df 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionAggregations.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionAggregations.java @@ -11,10 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.hive.HiveQueryRunner; import io.trino.testing.AbstractTestFaultTolerantExecutionAggregations; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionConnectorTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionConnectorTest.java similarity index 88% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionConnectorTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionConnectorTest.java index b8d4702bed04..e93718e4c0f6 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionConnectorTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionConnectorTest.java @@ -11,10 +11,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.Session; +import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.hive.BaseHiveConnectorTest; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; @@ -37,7 +39,12 @@ protected QueryRunner createQueryRunner() this.minioStorage = new MinioStorage("test-exchange-spooling-" + randomTableSuffix()); minioStorage.start(); - return BaseHiveConnectorTest.createHiveQueryRunner(getExtraProperties(), getExchangeManagerProperties(minioStorage)); + return BaseHiveConnectorTest.createHiveQueryRunner( + getExtraProperties(), + runner -> { + runner.installPlugin(new FileSystemExchangePlugin()); + runner.loadExchangeManager("filesystem", getExchangeManagerProperties(minioStorage)); + }); } @Override diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionJoinQueries.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionJoinQueries.java similarity index 96% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionJoinQueries.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionJoinQueries.java index 3928bc1be890..fed7a2bcd903 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionJoinQueries.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionJoinQueries.java @@ -11,10 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.hive.HiveQueryRunner; import io.trino.testing.AbstractTestFaultTolerantExecutionJoinQueries; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionOrderByQueries.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionOrderByQueries.java similarity index 96% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionOrderByQueries.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionOrderByQueries.java index 723b3a56f9b0..fd90f1c2bbe1 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionOrderByQueries.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionOrderByQueries.java @@ -11,10 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.hive.HiveQueryRunner; import io.trino.testing.AbstractTestFaultTolerantExecutionOrderByQueries; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionWindowQueries.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionWindowQueries.java similarity index 96% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionWindowQueries.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionWindowQueries.java index 652c91fc2143..b2d84b7b11c6 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionWindowQueries.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveFaultTolerantExecutionWindowQueries.java @@ -11,10 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.hive.HiveQueryRunner; import io.trino.testing.AbstractTestFaultTolerantExecutionWindowQueries; import io.trino.testing.QueryRunner; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQueryFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveQueryFailureRecoveryTest.java similarity index 99% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQueryFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveQueryFailureRecoveryTest.java index 07205c4adb27..f6334d98f285 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveQueryFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveQueryFailureRecoveryTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import com.google.common.collect.ImmutableMap; import io.trino.operator.RetryPolicy; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveTaskFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveTaskFailureRecoveryTest.java similarity index 99% rename from plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveTaskFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveTaskFailureRecoveryTest.java index b38db7986558..18fbbdbdc6f0 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveTaskFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/hive/TestHiveTaskFailureRecoveryTest.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.faulttolerant.hive; import com.google.common.collect.ImmutableMap; import io.trino.operator.RetryPolicy; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/BaseIcebergFailureRecoveryTest.java similarity index 99% rename from plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/BaseIcebergFailureRecoveryTest.java index e0b9699985e7..fbced2540041 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/BaseIcebergFailureRecoveryTest.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.iceberg; +package io.trino.faulttolerant.iceberg; +import io.trino.faulttolerant.BaseFailureRecoveryTest; import io.trino.operator.RetryPolicy; import io.trino.spi.ErrorType; -import io.trino.testing.BaseFailureRecoveryTest; import org.testng.annotations.Test; import java.util.List; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergQueryFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergQueryFailureRecoveryTest.java similarity index 96% rename from plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergQueryFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergQueryFailureRecoveryTest.java index 7d744698bf03..c79b60398192 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergQueryFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergQueryFailureRecoveryTest.java @@ -11,11 +11,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.iceberg; +package io.trino.faulttolerant.iceberg; import io.trino.operator.RetryPolicy; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.iceberg.IcebergQueryRunner; import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTaskFailureRecoveryTest.java b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergTaskFailureRecoveryTest.java similarity index 96% rename from plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTaskFailureRecoveryTest.java rename to testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergTaskFailureRecoveryTest.java index eec62f86508b..7b6e3db87a12 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergTaskFailureRecoveryTest.java +++ b/testing/trino-faulttolerant-tests/src/test/java/io/trino/faulttolerant/iceberg/TestIcebergTaskFailureRecoveryTest.java @@ -11,11 +11,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.iceberg; +package io.trino.faulttolerant.iceberg; import io.trino.operator.RetryPolicy; import io.trino.plugin.exchange.filesystem.FileSystemExchangePlugin; import io.trino.plugin.exchange.filesystem.containers.MinioStorage; +import io.trino.plugin.iceberg.IcebergQueryRunner; import io.trino.testing.QueryRunner; import io.trino.tpch.TpchTable; import org.testng.annotations.AfterClass;