From 8b359a1431acc56ddd48df62ab52c0e40fc60b49 Mon Sep 17 00:00:00 2001 From: Yuya Ebihara Date: Mon, 7 Nov 2022 14:04:19 +0900 Subject: [PATCH 1/2] Fix NullPointerException in test parameters --- .../io/trino/testng/services/FlakyTestRetryAnalyzer.java | 5 ++--- .../io/trino/testng/services/ProgressLoggingListener.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/testing/trino-testing-services/src/main/java/io/trino/testng/services/FlakyTestRetryAnalyzer.java b/testing/trino-testing-services/src/main/java/io/trino/testng/services/FlakyTestRetryAnalyzer.java index 6b32b601bac2..a6d8450d9b63 100644 --- a/testing/trino-testing-services/src/main/java/io/trino/testng/services/FlakyTestRetryAnalyzer.java +++ b/testing/trino-testing-services/src/main/java/io/trino/testng/services/FlakyTestRetryAnalyzer.java @@ -14,6 +14,7 @@ package io.trino.testng.services; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Joiner; import io.airlift.log.Logger; import org.testng.IRetryAnalyzer; import org.testng.ITestNGMethod; @@ -26,10 +27,8 @@ import java.util.Map; import java.util.Optional; import java.util.regex.Pattern; -import java.util.stream.Stream; import static com.google.common.base.Throwables.getStackTraceAsString; -import static com.google.common.collect.ImmutableList.toImmutableList; import static java.lang.String.format; public class FlakyTestRetryAnalyzer @@ -114,7 +113,7 @@ private static String getName(ITestNGMethod method, Object[] parameters) "%s::%s(%s)", actualTestClass, method.getMethodName(), - String.join(",", Stream.of(parameters).map(Object::toString).collect(toImmutableList()))); + Joiner.on(",").useForNull("null").join(parameters)); } return format("%s::%s", actualTestClass, method.getMethodName()); } diff --git a/testing/trino-testing-services/src/main/java/io/trino/testng/services/ProgressLoggingListener.java b/testing/trino-testing-services/src/main/java/io/trino/testng/services/ProgressLoggingListener.java index 1bc522065d34..08b7123ccd59 100644 --- a/testing/trino-testing-services/src/main/java/io/trino/testng/services/ProgressLoggingListener.java +++ b/testing/trino-testing-services/src/main/java/io/trino/testng/services/ProgressLoggingListener.java @@ -140,7 +140,7 @@ private String formatTestParameters(ITestResult testCase) if (parameters == null || parameters.length == 0) { return ""; } - return format(" [%s]", Joiner.on(", ").join(parameters)); + return format(" [%s]", Joiner.on(", ").useForNull("null").join(parameters)); } private static String formatDuration(ITestResult testCase) From 62238b5e6e8ed3fbef3ca42ddebf92fc68793dd3 Mon Sep 17 00:00:00 2001 From: Yuya Ebihara Date: Fri, 4 Nov 2022 17:20:26 +0900 Subject: [PATCH 2/2] Add `@Flaky` annotation to Databricks product tests --- ...estDatabricksWithGlueMetastoreCleanUp.java | 4 +++ .../TestDeltaLakeAlterTableCompatibility.java | 15 +++++++++ .../TestDeltaLakeColumnMappingMode.java | 20 +++++++++++ ...akeDatabricksCheckpointsCompatibility.java | 18 ++++++++++ ...ltaLakeDatabricksCompatibilityCleanUp.java | 4 +++ ...ricksCreateTableAsSelectCompatibility.java | 9 +++++ ...akeDatabricksCreateTableCompatibility.java | 10 ++++++ .../TestDeltaLakeDatabricksDelete.java | 4 +++ ...eltaLakeDatabricksInsertCompatibility.java | 19 +++++++++++ ...keDatabricksPartitioningCompatibility.java | 10 ++++++ .../TestDeltaLakeDatabricksUpdates.java | 5 +++ .../TestDeltaLakeDropTableCompatibility.java | 5 +++ .../product/deltalake/TestDeltaLakeJmx.java | 4 +++ .../TestDeltaLakeTransactionLogCache.java | 4 +++ ...DeltaLakeWriteDatabricksCompatibility.java | 15 +++++++++ .../TestHiveAndDeltaLakeCompatibility.java | 4 +++ .../TestHiveAndDeltaLakeRedirect.java | 33 +++++++++++++++++++ .../deltalake/util/DeltaLakeTestUtils.java | 6 ++++ 18 files changed, 189 insertions(+) diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDatabricksWithGlueMetastoreCleanUp.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDatabricksWithGlueMetastoreCleanUp.java index 76fb5da37f88..e5d5ac719f4d 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDatabricksWithGlueMetastoreCleanUp.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDatabricksWithGlueMetastoreCleanUp.java @@ -21,6 +21,7 @@ import io.airlift.log.Logger; import io.trino.tempto.ProductTest; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.time.Instant; @@ -32,6 +33,8 @@ import static com.google.common.collect.ImmutableSet.toImmutableSet; import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.utils.QueryExecutors.onTrino; import static java.lang.String.format; import static java.lang.System.currentTimeMillis; @@ -47,6 +50,7 @@ public class TestDatabricksWithGlueMetastoreCleanUp private static final long MAX_JOB_TIME_MILLIS = MINUTES.toMillis(5); @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCleanUpOldTablesUsingDelta() { AWSGlueAsync glueClient = AWSGlueAsyncClientBuilder.standard().build(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java index 9c0c0e4560de..bed1ed5daeff 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeAlterTableCompatibility.java @@ -13,6 +13,7 @@ */ package io.trino.tests.product.deltalake; +import io.trino.testng.services.Flaky; import org.assertj.core.api.Assertions; import org.testng.annotations.Test; @@ -28,6 +29,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_91_RUNTIME_VERSION; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getColumnCommentOnDelta; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getColumnCommentOnTrino; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getDatabricksRuntimeVersion; @@ -43,6 +46,7 @@ public class TestDeltaLakeAlterTableCompatibility extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testAddColumnWithCommentOnTrino() { String tableName = "test_dl_add_column_with_comment_" + randomTableSuffix(); @@ -64,6 +68,7 @@ public void testAddColumnWithCommentOnTrino() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testAddColumnUnsupportedWriterVersion() { String tableName = "test_dl_add_column_unsupported_writer_" + randomTableSuffix(); @@ -87,6 +92,7 @@ public void testAddColumnUnsupportedWriterVersion() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testRenameColumn() { String tableName = "test_dl_rename_column_" + randomTableSuffix(); @@ -119,6 +125,7 @@ public void testRenameColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testRenamePartitionedColumn() { String tableName = "test_dl_rename_partitioned_column_" + randomTableSuffix(); @@ -152,6 +159,7 @@ public void testRenamePartitionedColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCommentOnTable() { String tableName = "test_dl_comment_table_" + randomTableSuffix(); @@ -175,6 +183,7 @@ public void testCommentOnTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCommentOnTableUnsupportedWriterVersion() { String tableName = "test_dl_comment_table_unsupported_writer_" + randomTableSuffix(); @@ -198,6 +207,7 @@ public void testCommentOnTableUnsupportedWriterVersion() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCommentOnColumn() { String tableName = "test_dl_comment_column_" + randomTableSuffix(); @@ -219,6 +229,7 @@ public void testCommentOnColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCommentOnColumnUnsupportedWriterVersion() { String tableName = "test_dl_comment_column_unsupported_writer_" + randomTableSuffix(); @@ -242,6 +253,7 @@ public void testCommentOnColumnUnsupportedWriterVersion() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoAlterTablePreservesTableMetadata() { String tableName = "test_trino_alter_table_preserves_table_metadata_" + randomTableSuffix(); @@ -268,6 +280,7 @@ public void testTrinoAlterTablePreservesTableMetadata() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoAlterTablePreservesChangeDataFeed() { String tableName = "test_trino_alter_table_preserves_cdf_" + randomTableSuffix(); @@ -295,6 +308,7 @@ public void testTrinoAlterTablePreservesChangeDataFeed() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoPreservesReaderAndWriterVersions() { // Databricks 7.3 doesn't support 'delta.minReaderVersion' and 'delta.minWriterVersion' table properties @@ -329,6 +343,7 @@ public void testTrinoPreservesReaderAndWriterVersions() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoAlterTablePreservesGeneratedColumn() { // Databricks 7.3 doesn't support generated columns diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeColumnMappingMode.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeColumnMappingMode.java index 947726fb3bb4..1349cb76bc7c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeColumnMappingMode.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeColumnMappingMode.java @@ -15,6 +15,7 @@ import com.google.common.collect.ImmutableList; import io.trino.tempto.assertions.QueryAssert.Row; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; @@ -27,6 +28,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_EXCLUDE_91; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -35,6 +38,7 @@ public class TestDeltaLakeColumnMappingMode extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeNone() { String tableName = "test_dl_column_mapping_mode_none" + randomTableSuffix(); @@ -63,12 +67,14 @@ public void testColumnMappingModeNone() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeId() { testColumnMappingMode("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeName() { testColumnMappingMode("name"); @@ -132,12 +138,14 @@ private void testColumnMappingMode(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeNameWithNonLowerCaseColumnId() { testColumnMappingModeNameWithNonLowerCaseColumn("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeNameWithNonLowerCaseColumnName() { testColumnMappingModeNameWithNonLowerCaseColumn("name"); @@ -178,12 +186,14 @@ private void testColumnMappingModeNameWithNonLowerCaseColumn(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeIdAddColumn() { testColumnMappingModeAddColumn("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testColumnMappingModeNameAddColumn() { testColumnMappingModeAddColumn("name"); @@ -247,12 +257,14 @@ private void testColumnMappingModeAddColumn(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsFromJsonForColumnMappingModeId() { testShowStatsFromJsonForColumnMappingMode("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsFromJsonForColumnMappingModeName() { testShowStatsFromJsonForColumnMappingMode("name"); @@ -290,12 +302,14 @@ private void testShowStatsFromJsonForColumnMappingMode(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsFromParquetForColumnMappingModeId() { testShowStatsFromParquetForColumnMappingMode("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsFromParquetForColumnMappingModeName() { testShowStatsFromParquetForColumnMappingMode("name"); @@ -336,12 +350,14 @@ private void testShowStatsFromParquetForColumnMappingMode(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsOnPartitionedForColumnMappingModeId() { testShowStatsOnPartitionedForColumnMappingMode("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testShowStatsOnPartitionedForColumnMappingModeName() { testShowStatsOnPartitionedForColumnMappingMode("name"); @@ -379,12 +395,14 @@ private void testShowStatsOnPartitionedForColumnMappingMode(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testUnsupportedOperationsColumnMappingModeId() { testUnsupportedOperationsColumnMappingModeName("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testUnsupportedOperationsColumnMappingModeName() { testUnsupportedOperationsColumnMappingModeName("name"); @@ -426,12 +444,14 @@ private void testUnsupportedOperationsColumnMappingModeName(String mode) } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testSpecialCharacterColumnNamesWithColumnMappingModeId() { testSpecialCharacterColumnNamesWithColumnMappingMode("id"); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, DELTA_LAKE_EXCLUDE_91, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testSpecialCharacterColumnNamesWithColumnMappingModeName() { testSpecialCharacterColumnNamesWithColumnMappingMode("name"); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCheckpointsCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCheckpointsCompatibility.java index f1e08a08f218..0880e323aa53 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCheckpointsCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCheckpointsCompatibility.java @@ -21,6 +21,7 @@ import com.google.inject.name.Named; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; +import io.trino.testng.services.Flaky; import org.testng.SkipException; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -39,6 +40,8 @@ import static io.trino.tests.product.deltalake.TransactionLogAssertions.assertTransactionLogVersion; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_104_RUNTIME_VERSION; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_91_RUNTIME_VERSION; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getDatabricksRuntimeVersion; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; @@ -66,6 +69,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadTrinoCheckpoint() { String tableName = "test_dl_checkpoints_compat_" + randomTableSuffix(); @@ -126,6 +130,7 @@ public void testDatabricksCanReadTrinoCheckpoint() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoUsesCheckpointInterval() { String tableName = "test_dl_checkpoints_compat_" + randomTableSuffix(); @@ -185,6 +190,7 @@ public void testTrinoUsesCheckpointInterval() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksUsesCheckpointInterval() { String tableName = "test_dl_checkpoints_compat_" + randomTableSuffix(); @@ -256,6 +262,7 @@ public void testDatabricksUsesCheckpointInterval() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCheckpointMinMaxStatisticsForRowType() { String tableName = "test_dl_checkpoints_row_compat_min_max_trino_" + randomTableSuffix(); @@ -263,6 +270,7 @@ public void testTrinoCheckpointMinMaxStatisticsForRowType() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCheckpointMinMaxStatisticsForRowType() { String tableName = "test_dl_checkpoints_row_compat_min_max_databricks_" + randomTableSuffix(); @@ -321,6 +329,7 @@ private void testCheckpointMinMaxStatisticsForRowType(Consumer sqlExecut } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCheckpointNullStatisticsForRowType() { String tableName = "test_dl_checkpoints_row_compat_trino_" + randomTableSuffix(); @@ -328,6 +337,7 @@ public void testTrinoCheckpointNullStatisticsForRowType() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCheckpointNullStatisticsForRowType() { String tableName = "test_dl_checkpoints_row_compat_databricks_" + randomTableSuffix(); @@ -384,6 +394,7 @@ private void testCheckpointNullStatisticsForRowType(Consumer sqlExecutor } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoWriteStatsAsJsonDisabled() { String tableName = "test_dl_checkpoints_write_stats_as_json_disabled_trino_" + randomTableSuffix(); @@ -391,6 +402,7 @@ public void testTrinoWriteStatsAsJsonDisabled() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksWriteStatsAsJsonDisabled() { String tableName = "test_dl_checkpoints_write_stats_as_json_disabled_databricks_" + randomTableSuffix(); @@ -425,6 +437,7 @@ private void testWriteStatsAsJsonDisabled(Consumer sqlExecutor, String t } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoWriteStatsAsStructDisabled() { String tableName = "test_dl_checkpoints_write_stats_as_struct_disabled_trino_" + randomTableSuffix(); @@ -432,6 +445,7 @@ public void testTrinoWriteStatsAsStructDisabled() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksWriteStatsAsStructDisabled() { String tableName = "test_dl_checkpoints_write_stats_as_struct_disabled_databricks_" + randomTableSuffix(); @@ -467,6 +481,7 @@ private void testWriteStatsAsStructDisabled(Consumer sqlExecutor, String } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}, dataProvider = "testTrinoCheckpointWriteStatsAsJson") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoWriteStatsAsJsonEnabled(String type, String inputValue, Double nullsFraction, Object statsValue) { String tableName = "test_dl_checkpoints_write_stats_as_json_enabled_trino_" + randomTableSuffix(); @@ -474,6 +489,7 @@ public void testTrinoWriteStatsAsJsonEnabled(String type, String inputValue, Dou } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}, dataProvider = "testDeltaCheckpointWriteStatsAsJson") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksWriteStatsAsJsonEnabled(String type, String inputValue, Double nullsFraction, Object statsValue) { String tableName = "test_dl_checkpoints_write_stats_as_json_enabled_databricks_" + randomTableSuffix(); @@ -569,6 +585,7 @@ public Object[][] testDeltaCheckpointWriteStatsAsJson() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoWriteStatsAsStructEnabled() { String tableName = "test_dl_checkpoints_write_stats_as_struct_enabled_trino_" + randomTableSuffix(); @@ -576,6 +593,7 @@ public void testTrinoWriteStatsAsStructEnabled() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksWriteStatsAsStructEnabled() { String tableName = "test_dl_checkpoints_write_stats_as_struct_enabled_databricks_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCompatibilityCleanUp.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCompatibilityCleanUp.java index 2383cd716eab..fca76713d705 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCompatibilityCleanUp.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCompatibilityCleanUp.java @@ -18,6 +18,7 @@ import io.airlift.log.Logger; import io.trino.tempto.ProductTest; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.sql.Timestamp; @@ -26,6 +27,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; import static java.lang.String.format; @@ -43,6 +46,7 @@ public class TestDeltaLakeDatabricksCompatibilityCleanUp private static final Set SCHEMAS_TO_SKIP = ImmutableSet.of("information_schema", "tpch", "tcpds", "sf1", "sf10", "sf100", "sf1000", "tpcds_sf1", "tpcds_sf10", "tpcds_sf100", "tpcds_sf1000", "tpcds_sf300"); @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCleanUpOldTablesUsingDelta() { long startTime = currentTimeMillis(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableAsSelectCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableAsSelectCompatibility.java index 4363cf1f594f..24ed53f9776b 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableAsSelectCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableAsSelectCompatibility.java @@ -24,6 +24,7 @@ import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.io.IOException; @@ -38,6 +39,8 @@ import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tests.product.deltalake.TransactionLogAssertions.assertLastEntryIsCheckpointed; import static io.trino.tests.product.deltalake.TransactionLogAssertions.assertTransactionLogVersion; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -62,6 +65,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testPrestoTypesWithDatabricks() { String tableName = "test_dl_ctas_" + randomTableSuffix(); @@ -91,6 +95,7 @@ public void testPrestoTypesWithDatabricks() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testPrestoTimestampsWithDatabricks() { String tableName = "test_dl_ctas_timestamps_" + randomTableSuffix(); @@ -117,6 +122,7 @@ public void testPrestoTimestampsWithDatabricks() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testPrestoCacheInvalidatedOnCreateTable() throws URISyntaxException, IOException { @@ -166,6 +172,7 @@ public void testPrestoCacheInvalidatedOnCreateTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCreateFromTrinoWithDefaultPartitionValues() { String tableName = "test_create_partitioned_table_default_as_" + randomTableSuffix(); @@ -195,6 +202,7 @@ public void testCreateFromTrinoWithDefaultPartitionValues() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testReplaceTableWithSchemaChange() { String tableName = "test_replace_table_with_schema_change_" + randomTableSuffix(); @@ -219,6 +227,7 @@ public void testReplaceTableWithSchemaChange() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testReplaceTableWithSchemaChangeOnCheckpoint() { String tableName = "test_replace_table_with_schema_change_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableCompatibility.java index b9ab97ec7cdf..de29e208f66f 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksCreateTableCompatibility.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableList; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; @@ -25,6 +26,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_104_RUNTIME_VERSION; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getColumnCommentOnDelta; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getColumnCommentOnTrino; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getDatabricksRuntimeVersion; @@ -48,6 +51,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadInitialCreateTable() { String tableName = "test_dl_create_table_compat_" + randomTableSuffix(); @@ -87,6 +91,7 @@ public void testDatabricksCanReadInitialCreateTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadInitialCreatePartitionedTable() { String tableName = "test_dl_create_table_compat_" + randomTableSuffix(); @@ -129,6 +134,7 @@ public void testDatabricksCanReadInitialCreatePartitionedTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadInitialCreateTableAs() { String tableName = "test_dl_create_table_as_compat_" + randomTableSuffix(); @@ -173,6 +179,7 @@ public void testDatabricksCanReadInitialCreateTableAs() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadInitialCreatePartitionedTableAs() { String tableName = "test_dl_create_table_compat_" + randomTableSuffix(); @@ -235,6 +242,7 @@ private void testInsert(String tableName, List existingRows) } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCreateTableWithTableComment() { String tableName = "test_dl_create_table_comment_" + randomTableSuffix(); @@ -257,6 +265,7 @@ public void testCreateTableWithTableComment() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCreateTableWithColumnCommentOnTrino() { String tableName = "test_dl_create_column_comment_" + randomTableSuffix(); @@ -282,6 +291,7 @@ public void testCreateTableWithColumnCommentOnTrino() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCreateTableWithColumnCommentOnDelta() { String tableName = "test_dl_create_column_comment_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksDelete.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksDelete.java index 1bf353d4635d..70b640c07af2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksDelete.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksDelete.java @@ -13,6 +13,7 @@ */ package io.trino.tests.product.deltalake; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import static io.trino.tempto.assertions.QueryAssert.Row.row; @@ -21,6 +22,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -29,6 +32,7 @@ public class TestDeltaLakeDatabricksDelete extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeleteOnAppendOnlyTableFails() { String tableName = "test_delete_on_append_only_table_fails_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksInsertCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksInsertCompatibility.java index 11e277c5990e..ba32b5adeae0 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksInsertCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksInsertCompatibility.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableList; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert.Row; +import io.trino.testng.services.Flaky; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -32,6 +33,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_104_RUNTIME_VERSION; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.getDatabricksRuntimeVersion; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; @@ -51,6 +54,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInsertCompatibility() { String tableName = "test_dl_insert_" + randomTableSuffix(); @@ -86,6 +90,7 @@ public void testInsertCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testPartitionedInsertCompatibility() { String tableName = "test_dl_partitioned_insert_" + randomTableSuffix(); @@ -123,6 +128,7 @@ public void testPartitionedInsertCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoPartitionedDifferentOrderInsertCompatibility() { String tableName = "test_dl_trino_partitioned_different_order_insert_" + randomTableSuffix(); @@ -149,6 +155,7 @@ public void testTrinoPartitionedDifferentOrderInsertCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaPartitionedDifferentOrderInsertCompatibility() { String tableName = "test_dl_delta_partitioned_different_order_insert_" + randomTableSuffix(); @@ -175,6 +182,7 @@ public void testDeltaPartitionedDifferentOrderInsertCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInsertNonLowercaseColumnsCompatibility() { String tableName = "test_dl_insert_nonlowercase_columns_" + randomTableSuffix(); @@ -212,6 +220,7 @@ public void testInsertNonLowercaseColumnsCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInsertNestedNonLowercaseColumnsCompatibility() { String tableName = "test_dl_insert_nested_nonlowercase_columns_" + randomTableSuffix(); @@ -251,6 +260,7 @@ public void testInsertNestedNonLowercaseColumnsCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testPartitionedInsertNonLowercaseColumnsCompatibility() { String tableName = "test_dl_partitioned_insert_nonlowercase_columns" + randomTableSuffix(); @@ -289,6 +299,7 @@ public void testPartitionedInsertNonLowercaseColumnsCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeleteCompatibility() { String tableName = "test_delete_compatibility_" + randomTableSuffix(); @@ -316,6 +327,7 @@ public void testDeleteCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCheckConstraintsCompatibility() { // CHECK constraint is not supported by Trino @@ -353,6 +365,7 @@ public void testCheckConstraintsCompatibility() * but it's not verified that compression actually takes place. */ @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "compressionCodecs") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCompression(String compressionCodec) { testCompression(false, compressionCodec); @@ -363,6 +376,7 @@ public void testCompression(String compressionCodec) * and reads succeed, but it's not verified that compression actually takes place. */ @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "compressionCodecs") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCompressionWithOptimizedWriter(String compressionCodec) { testCompression(true, compressionCodec); @@ -413,6 +427,7 @@ private void testCompression(boolean optimizedWriter, String compressionCodec) } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void verifyCompressionCodecsDataProvider() { assertThat(onTrino().executeQuery("SHOW SESSION LIKE 'delta.compression_codec'")) @@ -440,6 +455,7 @@ public Object[][] compressionCodecs() } @Test(groups = {DELTA_LAKE_OSS, DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testWritesToTableWithCheckConstraintFails() { String tableName = "test_writes_into_table_with_check_constraint_" + randomTableSuffix(); @@ -465,6 +481,7 @@ public void testWritesToTableWithCheckConstraintFails() } @Test(groups = {DELTA_LAKE_OSS, DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testMetadataOperationsRetainCheckConstraints() { String tableName = "test_metadata_operations_retain_check_constraints_" + randomTableSuffix(); @@ -487,6 +504,7 @@ public void testMetadataOperationsRetainCheckConstraints() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testWritesToTableWithGeneratedColumnFails() { String tableName = "test_writes_into_table_with_generated_column_" + randomTableSuffix(); @@ -517,6 +535,7 @@ public void testWritesToTableWithGeneratedColumnFails() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testWritesToTableWithCDFFails() { String tableName = "test_writes_into_table_with_CDF_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksPartitioningCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksPartitioningCompatibility.java index 7b554e272caa..2915761cb315 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksPartitioningCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksPartitioningCompatibility.java @@ -15,12 +15,15 @@ import com.google.common.collect.ImmutableList; import io.trino.tempto.assertions.QueryAssert; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import static io.trino.tempto.assertions.QueryAssert.Row.row; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -30,6 +33,7 @@ public class TestDeltaLakeDatabricksPartitioningCompatibility extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadFromCtasTableCreatedByTrinoWithSpecialCharactersInPartitioningColumn() { testDatabricksCanReadFromCtasTableCreatedByTrinoWithSpecialCharactersInPartitioningColumnWithCpIntervalSet(1); @@ -80,6 +84,7 @@ private void testDatabricksCanReadFromCtasTableCreatedByTrinoWithSpecialCharacte } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCanReadFromCtasTableCreatedByDatabricksWithSpecialCharactersInPartitioningColumn() { testTrinoCanReadFromCtasTableCreatedByDatabricksWithSpecialCharactersInPartitioningColumnWithCpIntervalSet(1); @@ -133,6 +138,7 @@ private void testTrinoCanReadFromCtasTableCreatedByDatabricksWithSpecialCharacte } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadTableCreatedByTrinoWithSpecialCharactersInPartitioningColumn() { testDatabricksCanReadTableCreatedByTrinoWithSpecialCharactersInPartitioningColumnWithCpIntervalSet(1); @@ -185,6 +191,7 @@ private void testDatabricksCanReadTableCreatedByTrinoWithSpecialCharactersInPart } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCanReadTableCreatedByDatabricksWithSpecialCharactersInPartitioningColumn() { testTrinoCanReadTableCreatedByDatabricksWithSpecialCharactersInPartitioningColumnWithCpIntervalSet(1); @@ -240,6 +247,7 @@ private void testTrinoCanReadTableCreatedByDatabricksWithSpecialCharactersInPart } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksCanReadFromTableUpdatedByTrino() { testDatabricksCanReadFromTableUpdatedByTrinoWithCpIntervalSet(1); @@ -292,6 +300,7 @@ private void testDatabricksCanReadFromTableUpdatedByTrinoWithCpIntervalSet(int i } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCanReadFromTableUpdatedByDatabricks() { testTrinoCanReadFromTableUpdatedByDatabricksWithCpIntervalSet(1); @@ -347,6 +356,7 @@ private void testTrinoCanReadFromTableUpdatedByDatabricksWithCpIntervalSet(int i } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoCanReadFromTablePartitionChangedByDatabricks() { String tableName = "test_dl_create_table_partition_changed_by_databricks_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksUpdates.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksUpdates.java index 98fad6faedfc..168af5d72e03 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksUpdates.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDatabricksUpdates.java @@ -15,6 +15,7 @@ import io.trino.tempto.assertions.QueryAssert; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import java.util.List; @@ -26,6 +27,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -35,6 +38,7 @@ public class TestDeltaLakeDatabricksUpdates extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testUpdateOnAppendOnlyTableFails() { String tableName = "test_update_on_append_only_table_fails_" + randomTableSuffix(); @@ -57,6 +61,7 @@ public void testUpdateOnAppendOnlyTableFails() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testUpdatesFromDatabricks() { String tableName = "test_updates_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDropTableCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDropTableCompatibility.java index ab26919c5416..23243b07f2e3 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDropTableCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeDropTableCompatibility.java @@ -18,6 +18,7 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.trino.tempto.BeforeTestWithContext; +import io.trino.testng.services.Flaky; import io.trino.tests.product.hive.Engine; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -27,6 +28,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.Engine.DELTA; import static io.trino.tests.product.hive.Engine.TRINO; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; @@ -66,12 +69,14 @@ public static Object[][] engineConfigurations() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}, dataProvider = "engineConfigurations") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDropTable(Engine creator, Engine dropper, boolean explicitLocation) { testDropTableAccuracy(creator, dropper, explicitLocation); } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCreateManagedTableInDeltaDropTableInTrino() { //TODO Integrate this method into `engineConfigurations()` data provider method after dealing with https://github.com/trinodb/trino/issues/13017 diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java index 2fe0a81f609c..60fcb8d1fb55 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java @@ -14,6 +14,7 @@ package io.trino.tests.product.deltalake; import io.trino.tempto.ProductTest; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import static io.trino.tempto.assertions.QueryAssert.Row.row; @@ -21,12 +22,15 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.utils.QueryExecutors.onTrino; public class TestDeltaLakeJmx extends ProductTest { @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testJmxTablesExposedByDeltaLakeConnectorBackedByGlueMetastore() { assertThat(onTrino().executeQuery("SHOW TABLES IN jmx.current LIKE '%name=delta%'")).containsOnly( diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeTransactionLogCache.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeTransactionLogCache.java index 2f2b6edcfae0..8a439bc5731c 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeTransactionLogCache.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeTransactionLogCache.java @@ -20,6 +20,7 @@ import com.google.inject.name.Named; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; +import io.trino.testng.services.Flaky; import org.assertj.core.api.Assertions; import org.testng.annotations.Test; @@ -32,6 +33,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -54,6 +57,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testAllDataFilesAreLoadedWhenTransactionLogFileAfterTheCachedTableVersionIsMissing() { String tableName = "test_dl_cached_table_files_accuracy_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeWriteDatabricksCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeWriteDatabricksCompatibility.java index c68af9192544..5c8432ec4784 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeWriteDatabricksCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeWriteDatabricksCompatibility.java @@ -18,6 +18,7 @@ import com.google.inject.name.Named; import io.trino.tempto.BeforeTestWithContext; import io.trino.tempto.assertions.QueryAssert; +import io.trino.testng.services.Flaky; import org.assertj.core.api.Assertions; import org.assertj.core.api.SoftAssertions; import org.testng.annotations.DataProvider; @@ -33,6 +34,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_EXCLUDE_73; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -58,6 +61,7 @@ public void setup() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testUpdateCompatibility() { String tableName = "test_update_compatibility_" + randomTableSuffix(); @@ -89,6 +93,7 @@ public void testUpdateCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeleteCompatibility() { String tableName = "test_delete_compatibility_" + randomTableSuffix(); @@ -118,6 +123,7 @@ public void testDeleteCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeleteOnPartitionedTableCompatibility() { String tableName = "test_delete_on_partitioned_table_compatibility_" + randomTableSuffix(); @@ -147,6 +153,7 @@ public void testDeleteOnPartitionedTableCompatibility() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeleteOnPartitionKeyCompatibility() { String tableName = "test_delete_on_partitioned_table_compatibility_" + randomTableSuffix(); @@ -174,6 +181,7 @@ public void testDeleteOnPartitionKeyCompatibility() // Test partition case sensitivity when updating @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "partition_column_names") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCaseUpdateInPartition(String partitionColumn) { try (CaseTestTable table = new CaseTestTable("update_case_compat", partitionColumn, List.of( @@ -188,6 +196,7 @@ public void testCaseUpdateInPartition(String partitionColumn) // Test that the correct error is generated when attempting to update the partition columns @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "partition_column_names") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCaseUpdatePartitionColumnFails(String partitionColumn) { try (CaseTestTable table = new CaseTestTable("update_case_compat", partitionColumn, List.of(row(1, 1, 1)))) { @@ -200,6 +209,7 @@ public void testCaseUpdatePartitionColumnFails(String partitionColumn) // Delete within a partition @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "partition_column_names") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCaseDeletePartialPartition(String partitionColumn) { try (CaseTestTable table = new CaseTestTable("delete_case_compat", partitionColumn, List.of( @@ -213,6 +223,7 @@ public void testCaseDeletePartialPartition(String partitionColumn) // Delete an entire partition @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}, dataProvider = "partition_column_names") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testCaseDeleteEntirePartition(String partitionColumn) { try (CaseTestTable table = new CaseTestTable("delete_case_compat", partitionColumn, List.of( @@ -225,6 +236,7 @@ public void testCaseDeleteEntirePartition(String partitionColumn) } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoRespectsDatabricksSettingNonNullableColumn() { String tableName = "test_databricks_table_with_nonnullable_columns_" + randomTableSuffix(); @@ -252,6 +264,7 @@ public void testTrinoRespectsDatabricksSettingNonNullableColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksRespectsTrinoSettingNonNullableColumn() { String tableName = "test_trino_table_with_nonnullable_columns_" + randomTableSuffix(); @@ -306,6 +319,7 @@ public void testInsertingIntoDatabricksTableWithAddedNotNullConstraint() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testTrinoVacuumRemoveChangeDataFeedFiles() { testVacuumRemoveChangeDataFeedFiles(tableName -> { @@ -315,6 +329,7 @@ public void testTrinoVacuumRemoveChangeDataFeedFiles() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_EXCLUDE_73, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDatabricksVacuumRemoveChangeDataFeedFiles() { testVacuumRemoveChangeDataFeedFiles(tableName -> { diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java index 9cd338db0a4d..f4a34679b4ba 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java @@ -14,12 +14,15 @@ package io.trino.tests.product.deltalake; import io.trino.tempto.ProductTest; +import io.trino.testng.services.Flaky; import org.testng.annotations.Test; import static io.trino.tempto.assertions.QueryAssert.assertThat; import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onTrino; import static java.lang.String.format; @@ -28,6 +31,7 @@ public class TestHiveAndDeltaLakeCompatibility extends ProductTest { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInformationSchemaColumnsOnPresenceOfHiveView() { // use dedicated schema so we control the number and shape of tables diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeRedirect.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeRedirect.java index caf9b4cd2254..71a89365c7ee 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeRedirect.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeRedirect.java @@ -17,6 +17,7 @@ import io.trino.tempto.assertions.QueryAssert.Row; import io.trino.tempto.query.QueryExecutionException; import io.trino.tempto.query.QueryResult; +import io.trino.testng.services.Flaky; import org.assertj.core.api.AbstractStringAssert; import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; @@ -37,6 +38,8 @@ import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS; import static io.trino.tests.product.TestGroups.DELTA_LAKE_OSS; import static io.trino.tests.product.TestGroups.PROFILE_SPECIFIC_TESTS; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_ISSUE; +import static io.trino.tests.product.deltalake.util.DeltaLakeTestUtils.DATABRICKS_COMMUNICATION_FAILURE_MATCH; import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix; import static io.trino.tests.product.utils.QueryExecutors.onDelta; import static io.trino.tests.product.utils.QueryExecutors.onTrino; @@ -47,6 +50,7 @@ public class TestHiveAndDeltaLakeRedirect extends BaseTestDeltaLakeS3Storage { @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaRedirect() { String tableName = "test_redirect_to_delta_" + randomTableSuffix(); @@ -66,6 +70,7 @@ public void testHiveToDeltaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaNonDefaultSchemaRedirect() { String schemaName = "test_extraordinary_" + randomTableSuffix(); @@ -88,6 +93,7 @@ public void testHiveToDeltaNonDefaultSchemaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToNonexistentDeltaCatalogRedirectFailure() { String tableName = "test_redirect_to_nonexistent_delta_" + randomTableSuffix(); @@ -107,6 +113,7 @@ public void testHiveToNonexistentDeltaCatalogRedirectFailure() // Note: this tests engine more than connectors. Still good scenario to test. @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaRedirectWithDefaultSchemaInSession() { String tableName = "test_redirect_to_delta_with_use_" + randomTableSuffix(); @@ -128,6 +135,7 @@ public void testHiveToDeltaRedirectWithDefaultSchemaInSession() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToUnpartitionedDeltaPartitionsRedirectFailure() { String tableName = "test_delta_lake_unpartitioned_table_" + randomTableSuffix(); @@ -145,6 +153,7 @@ public void testHiveToUnpartitionedDeltaPartitionsRedirectFailure() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToPartitionedDeltaPartitionsRedirectFailure() { String tableName = "test_delta_lake_partitioned_table_" + randomTableSuffix(); @@ -162,6 +171,7 @@ public void testHiveToPartitionedDeltaPartitionsRedirectFailure() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveRedirect() { String tableName = "test_redirect_to_hive_" + randomTableSuffix(); @@ -186,6 +196,7 @@ public void testDeltaToHiveRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveNonDefaultSchemaRedirect() { String schemaName = "test_extraordinary" + randomTableSuffix(); @@ -215,6 +226,7 @@ public void testDeltaToHiveNonDefaultSchemaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToNonexistentHiveCatalogRedirectFailure() { String tableName = "test_redirect_to_nonexistent_hive_" + randomTableSuffix(); @@ -234,6 +246,7 @@ public void testDeltaToNonexistentHiveCatalogRedirectFailure() // Note: this tests engine more than connectors. Still good scenario to test. @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveRedirectWithDefaultSchemaInSession() { String tableName = "test_redirect_to_hive_with_use_" + randomTableSuffix(); @@ -260,6 +273,7 @@ public void testDeltaToHiveRedirectWithDefaultSchemaInSession() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToPartitionedHivePartitionsRedirect() { String tableName = "test_hive_partitioned_table_" + randomTableSuffix(); @@ -284,6 +298,7 @@ public void testDeltaToPartitionedHivePartitionsRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToUnpartitionedHivePartitionsRedirectFailure() { String tableName = "test_hive_unpartitioned_table_" + randomTableSuffix(); @@ -300,6 +315,7 @@ public void testDeltaToUnpartitionedHivePartitionsRedirectFailure() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveInsert() { String tableName = "test_hive_insert_by_delta_" + randomTableSuffix(); @@ -329,6 +345,7 @@ public void testDeltaToHiveInsert() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaInsert() { String tableName = "test_delta_insert_by_hive_" + randomTableSuffix(); @@ -347,6 +364,7 @@ public void testHiveToDeltaInsert() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveDescribe() { String tableName = "test_hive_describe_by_delta_" + randomTableSuffix(); @@ -367,6 +385,7 @@ public void testDeltaToHiveDescribe() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaDescribe() { String tableName = "test_delta_describe_by_hive_" + randomTableSuffix(); @@ -388,6 +407,7 @@ public void testHiveToDeltaDescribe() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveShowCreateTable() { String tableName = "test_hive_show_create_table_by_delta_" + randomTableSuffix(); @@ -404,6 +424,7 @@ public void testDeltaToHiveShowCreateTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaShowCreateTable() { String tableName = "test_delta_show_create_table_by_hive_" + randomTableSuffix(); @@ -420,6 +441,7 @@ public void testHiveToDeltaShowCreateTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveAlterTable() { String tableName = "test_hive_alter_table_by_delta_" + randomTableSuffix(); @@ -445,6 +467,7 @@ public void testDeltaToHiveAlterTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaAlterTable() { String tableName = "test_delta_alter_table_by_hive_" + randomTableSuffix(); @@ -463,6 +486,7 @@ public void testHiveToDeltaAlterTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveCommentTable() { String tableName = "test_hive_comment_table_by_delta_" + randomTableSuffix(); @@ -483,6 +507,7 @@ public void testDeltaToHiveCommentTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaCommentTable() { String tableName = "test_delta_comment_table_by_hive_" + randomTableSuffix(); @@ -504,6 +529,7 @@ public void testHiveToDeltaCommentTable() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testDeltaToHiveCommentColumn() { String tableName = "test_hive_comment_column_by_delta_" + randomTableSuffix(); @@ -526,6 +552,7 @@ public void testDeltaToHiveCommentColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testHiveToDeltaCommentColumn() { String tableName = "test_delta_comment_column_by_hive_" + randomTableSuffix(); @@ -549,6 +576,7 @@ public void testHiveToDeltaCommentColumn() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInsertIntoDeltaTableFromHiveNonDefaultSchemaRedirect() { String destSchema = "test_extraordinary_" + randomTableSuffix(); @@ -584,6 +612,7 @@ public void testInsertIntoDeltaTableFromHiveNonDefaultSchemaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInformationSchemaColumnsHiveToDeltaRedirect() { // use dedicated schema so we control the number and shape of tables @@ -629,6 +658,7 @@ public void testInformationSchemaColumnsHiveToDeltaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testInformationSchemaColumnsDeltaToHiveRedirect() { // use dedicated schema so we control the number and shape of tables @@ -671,6 +701,7 @@ public void testInformationSchemaColumnsDeltaToHiveRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testSystemJdbcColumnsHiveToDeltaRedirect() { // use dedicated schema so we control the number and shape of tables @@ -717,6 +748,7 @@ public void testSystemJdbcColumnsHiveToDeltaRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testSystemJdbcColumnsDeltaToHiveRedirect() { // use dedicated schema so we control the number and shape of tables @@ -759,6 +791,7 @@ public void testSystemJdbcColumnsDeltaToHiveRedirect() } @Test(groups = {DELTA_LAKE_DATABRICKS, DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}, dataProvider = "trueFalse") + @Flaky(issue = DATABRICKS_COMMUNICATION_FAILURE_ISSUE, match = DATABRICKS_COMMUNICATION_FAILURE_MATCH) public void testViewReferencingHiveAndDeltaTable(boolean legacyHiveViewTranslation) { String hiveTableName = "test_view_hive_table_" + randomTableSuffix(); diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/util/DeltaLakeTestUtils.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/util/DeltaLakeTestUtils.java index 331e647630ab..ae07381813bb 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/util/DeltaLakeTestUtils.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/util/DeltaLakeTestUtils.java @@ -14,6 +14,7 @@ package io.trino.tests.product.deltalake.util; import io.trino.tempto.query.QueryResult; +import org.intellij.lang.annotations.Language; import static com.google.common.base.MoreObjects.firstNonNull; import static io.trino.tests.product.utils.QueryExecutors.onDelta; @@ -25,6 +26,11 @@ public final class DeltaLakeTestUtils public static final String DATABRICKS_104_RUNTIME_VERSION = "10.4"; public static final String DATABRICKS_91_RUNTIME_VERSION = "9.1"; + public static final String DATABRICKS_COMMUNICATION_FAILURE_ISSUE = "https://github.com/trinodb/trino/issues/14391"; + @Language("RegExp") + public static final String DATABRICKS_COMMUNICATION_FAILURE_MATCH = + "\\Q[Databricks][DatabricksJDBCDriver](500593) Communication link failure. Failed to connect to server. Reason: HTTP retry after response received with no Retry-After header, error: HTTP Response code: 503, Error message: Unknown."; + private DeltaLakeTestUtils() {} public static String getDatabricksRuntimeVersion()