Skip to content

Commit

Permalink
[core] fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
LinMingQiang committed Jan 24, 2025
1 parent cbecad1 commit 9c74fa1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,15 @@ public void testPartitionMarkDoneWithMultiplePartitionKey(boolean hasPk, String
@MethodSource("testArguments")
public void testCustomPartitionMarkDoneAction(boolean hasPk, String invoker) throws Exception {

MockCustomPartitionMarkDoneAction.getMarkedDonePartitions().clear();
Map<String, String> options = new HashMap<>(2);
options.put(PARTITION_MARK_DONE_ACTION.key(), SUCCESS_FILE + "," + CUSTOM);
options.put(
PARTITION_MARK_DONE_CUSTOM_CLASS.key(),
MockCustomPartitionMarkDoneAction.class.getName());

FileStoreTable table = prepareTable(hasPk, options);
String fullTableName = table.fullName();

switch (invoker) {
case "action":
Expand Down Expand Up @@ -217,7 +219,9 @@ public void testCustomPartitionMarkDoneAction(boolean hasPk, String invoker) thr
assertThat(successFile2).isNotNull();

assertThat(MockCustomPartitionMarkDoneAction.getMarkedDonePartitions())
.containsExactlyInAnyOrder("partKey0=0/partKey1=1/", "partKey0=1/partKey1=0/");
.containsExactlyInAnyOrder(
"table=" + fullTableName + ",partition=partKey0=0/partKey1=1/",
"table=" + fullTableName + ",partition=partKey0=1/partKey1=0/");
}

@ParameterizedTest
Expand Down

0 comments on commit 9c74fa1

Please sign in to comment.