Skip to content

Commit

Permalink
Mark tests that write using Hive as flaky in TestHiveStorageFormats
Browse files Browse the repository at this point in the history
These tests sometimes fail with "Error committing write to Hive".
  • Loading branch information
hashhar committed Feb 3, 2022
1 parent 1f1177b commit 3efbce7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.trino.tempto.query.QueryExecutionException;
import io.trino.tempto.query.QueryExecutor.QueryParam;
import io.trino.tempto.query.QueryResult;
import io.trino.testng.services.Flaky;
import io.trino.tests.product.utils.JdbcDriverUtils;
import org.apache.parquet.hadoop.ParquetWriter;
import org.assertj.core.api.Assertions;
Expand Down Expand Up @@ -65,6 +66,8 @@
import static io.trino.tests.product.TestGroups.HMS_ONLY;
import static io.trino.tests.product.TestGroups.STORAGE_FORMATS;
import static io.trino.tests.product.TestGroups.STORAGE_FORMATS_DETAILED;
import static io.trino.tests.product.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE;
import static io.trino.tests.product.hive.HiveProductTest.ERROR_COMMITTING_WRITE_TO_HIVE_MATCH;
import static io.trino.tests.product.hive.util.TemporaryHiveTable.randomTableSuffix;
import static io.trino.tests.product.utils.JdbcDriverUtils.setSessionProperty;
import static io.trino.tests.product.utils.QueryExecutors.onHive;
Expand Down Expand Up @@ -458,6 +461,7 @@ public void testInsertAndSelectWithNullFormat(StorageFormat storageFormat)
}

@Test(dataProvider = "storageFormatsWithZeroByteFile", groups = STORAGE_FORMATS_DETAILED)
@Flaky(issue = ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE, match = ERROR_COMMITTING_WRITE_TO_HIVE_MATCH)
public void testSelectFromZeroByteFile(StorageFormat storageFormat)
{
String tableName = format(
Expand All @@ -478,6 +482,7 @@ public void testSelectFromZeroByteFile(StorageFormat storageFormat)
}

@Test(dataProvider = "storageFormatsWithNullFormat", groups = STORAGE_FORMATS_DETAILED)
@Flaky(issue = ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE, match = ERROR_COMMITTING_WRITE_TO_HIVE_MATCH)
public void testSelectWithNullFormat(StorageFormat storageFormat)
{
String nullFormat = "null_value";
Expand Down Expand Up @@ -635,6 +640,7 @@ private void testNestedFields(String format, Engine writer)
}

@Test(groups = STORAGE_FORMATS_DETAILED)
@Flaky(issue = ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE, match = ERROR_COMMITTING_WRITE_TO_HIVE_MATCH)
public void testOrcStructsWithNonLowercaseFields()
throws SQLException
{
Expand Down Expand Up @@ -671,6 +677,7 @@ public void testOrcStructsWithNonLowercaseFields()
}

@Test(dataProvider = "storageFormatsWithNanosecondPrecision", groups = STORAGE_FORMATS_DETAILED)
@Flaky(issue = ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE, match = ERROR_COMMITTING_WRITE_TO_HIVE_MATCH)
public void testTimestampCreatedFromHive(StorageFormat storageFormat)
{
String tableName = createSimpleTimestampTable("timestamps_from_hive", storageFormat);
Expand Down Expand Up @@ -704,6 +711,7 @@ public void testTimestampCreatedFromTrino(StorageFormat storageFormat)
}

@Test(dataProvider = "storageFormatsWithNanosecondPrecision", groups = STORAGE_FORMATS_DETAILED)
@Flaky(issue = ERROR_COMMITTING_WRITE_TO_HIVE_ISSUE, match = ERROR_COMMITTING_WRITE_TO_HIVE_MATCH)
public void testStructTimestampsFromHive(StorageFormat format)
{
String tableName = createStructTimestampTable("hive_struct_timestamp", format);
Expand Down

0 comments on commit 3efbce7

Please sign in to comment.