Skip to content

Commit e7a8deb

Browse files
committed
Fix test failure caused by concurrent operations on the same table
1 parent d14aa34 commit e7a8deb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedSmokeTestBase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
import static com.facebook.presto.iceberg.procedure.RegisterTableProcedure.getFileSystem;
7474
import static com.facebook.presto.iceberg.procedure.RegisterTableProcedure.resolveLatestMetadataLocation;
7575
import static com.facebook.presto.testing.MaterializedResult.resultBuilder;
76+
import static com.facebook.presto.tests.sql.TestTable.randomTableSuffix;
7677
import static com.google.common.base.Preconditions.checkArgument;
7778
import static com.google.common.collect.Iterables.getOnlyElement;
7879
import static java.lang.String.format;
@@ -2018,7 +2019,7 @@ public void testMetadataDeleteOnTableAfterWholeRewriteDataFiles(String version,
20182019
{
20192020
String errorMessage = "This connector only supports delete where one or more partitions are deleted entirely.*";
20202021
String schemaName = getSession().getSchema().get();
2021-
String tableName = "test_rewrite_data_files_table";
2022+
String tableName = "test_rewrite_data_files_table_" + randomTableSuffix();
20222023
try {
20232024
// Create a table with partition column `a`, and insert some data under this partition spec
20242025
assertUpdate("CREATE TABLE " + tableName + " (a INTEGER, b VARCHAR) WITH (format_version = '" + version + "', delete_mode = '" + mode + "')");
@@ -2048,7 +2049,7 @@ public void testMetadataDeleteOnTableAfterPartialRewriteDataFiles(String version
20482049
{
20492050
String errorMessage = "This connector only supports delete where one or more partitions are deleted entirely.*";
20502051
String schemaName = getSession().getSchema().get();
2051-
String tableName = "test_rewrite_data_files_table";
2052+
String tableName = "test_rewrite_data_files_table_" + randomTableSuffix();
20522053
try {
20532054
// Create a table with partition column `a`, and insert some data under this partition spec
20542055
assertUpdate("CREATE TABLE " + tableName + " (a INTEGER, b VARCHAR) WITH (format_version = '" + version + "', delete_mode = '" + mode + "', partitioning = ARRAY['a'])");

presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ public void testDecimal(boolean decimalVectorReaderEnabled)
20352035

20362036
public void testMetadataDeleteOnV2MorTableWithRewriteDataFiles()
20372037
{
2038-
String tableName = "test_rewrite_data_files_table";
2038+
String tableName = "test_rewrite_data_files_table_" + randomTableSuffix();
20392039
try {
20402040
// Create a table with partition column `a`, and insert some data under this partition spec
20412041
assertUpdate("CREATE TABLE " + tableName + " (a INTEGER, b VARCHAR) WITH (format_version = '2', delete_mode = 'merge-on-read')");

0 commit comments

Comments
 (0)