Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzelin committed Nov 18, 2024
1 parent 31e01dd commit dcf736f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.paimon.schema.TableSchema;
import org.apache.paimon.table.FileStoreTable;
import org.apache.paimon.table.FileStoreTableFactory;
import org.apache.paimon.table.source.EndOfScanException;
import org.apache.paimon.types.DataTypes;

import org.junit.jupiter.api.BeforeEach;
Expand All @@ -43,7 +44,9 @@

import static org.apache.paimon.mergetree.compact.MergeTreeCompactManagerTest.row;
import static org.apache.paimon.stats.StatsTestUtils.newSimpleStats;
import static org.apache.paimon.testutils.assertj.PaimonAssertions.anyCauseMatches;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

/** Tests for {@link UnawareAppendTableCompactionCoordinator}. */
public class UnawareAppendTableCompactionCoordinatorTest {
Expand Down Expand Up @@ -135,6 +138,14 @@ public void testAgeGrowUp() {
.isEqualTo(0);
}

@Test
public void testBatchScanEmptyTable() {
compactionCoordinator =
new UnawareAppendTableCompactionCoordinator(appendOnlyFileStoreTable, false);
assertThatThrownBy(() -> compactionCoordinator.scan())
.satisfies(anyCauseMatches(EndOfScanException.class));
}

private void assertTasks(List<DataFileMeta> files, int taskNum) {
compactionCoordinator.notifyNewFiles(partition, files);
List<UnawareAppendCompactionTask> tasks = compactionCoordinator.compactPlan();
Expand Down

0 comments on commit dcf736f

Please sign in to comment.