diff --git a/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java b/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java index dfd11bb1344d9..dfcea2f83cffa 100644 --- a/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java +++ b/presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java @@ -3007,13 +3007,23 @@ public void testBucketSortedTables() throws Exception { SchemaTableName table = temporaryTable("create_sorted"); - SchemaTableName tableWithTempPath = temporaryTable("create_sorted_with_temp_path"); try { doTestBucketSortedTables(table, false, ORC); - doTestBucketSortedTables(tableWithTempPath, true, ORC); } finally { dropTable(table); + } + } + + @Test + public void testBucketSortedTablesTempPath() + throws Exception + { + SchemaTableName tableWithTempPath = temporaryTable("create_sorted_with_temp_path"); + try { + doTestBucketSortedTables(tableWithTempPath, true, ORC); + } + finally { dropTable(tableWithTempPath); } } @@ -3077,7 +3087,6 @@ private void doTestBucketSortedTables(SchemaTableName table, boolean useTempPath table.getTableName(), outputHandle.getLocationHandle().getTargetPath().toString(), true); - Set files = listAllDataFiles(context, path); assertThat(listAllDataFiles(context, path)) .filteredOn(file -> file.contains(".tmp-sort")) .size().isGreaterThan(bucketCount * getHiveClientConfig().getMaxOpenSortFiles() * 2);