Skip to content

Commit

Permalink
Make tests independent so they don't interfere
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 9, 2024
1 parent fb1a4c8 commit ae0be4f
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -3077,7 +3087,6 @@ private void doTestBucketSortedTables(SchemaTableName table, boolean useTempPath
table.getTableName(),
outputHandle.getLocationHandle().getTargetPath().toString(),
true);
Set<String> files = listAllDataFiles(context, path);
assertThat(listAllDataFiles(context, path))
.filteredOn(file -> file.contains(".tmp-sort"))
.size().isGreaterThan(bucketCount * getHiveClientConfig().getMaxOpenSortFiles() * 2);
Expand Down

0 comments on commit ae0be4f

Please sign in to comment.