Skip to content

Commit

Permalink
fix unstable ut
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehil committed Dec 3, 2024
1 parent f31faac commit b10eb47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public int compareTo(PartitionDefinition o) {
similar.retainAll(o.tabletIds);
diffSelf.removeAll(similar);
diffOther.removeAll(similar);
if (diffSelf.size() == 0) {
if (diffSelf.isEmpty()) {
return 0;
}
long diff = Collections.min(diffSelf) - Collections.min(diffOther);
Expand All @@ -127,7 +127,7 @@ public boolean equals(Object o) {
return Objects.equals(database, that.database)
&& Objects.equals(table, that.table)
&& Objects.equals(beAddress, that.beAddress)
&& Objects.deepEquals(tabletIds, that.tabletIds)
&& tabletIds.size() == that.tabletIds.size() && tabletIds.containsAll(that.tabletIds)
&& Objects.equals(queryPlan, that.queryPlan)
&& Objects.equals(serializedSettings, that.serializedSettings);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.doris.spark.rest;

import org.apache.commons.collections4.ListUtils;
import static org.apache.doris.spark.cfg.ConfigurationOptions.DORIS_FENODES;
import static org.apache.doris.spark.cfg.ConfigurationOptions.DORIS_TABLET_SIZE;
import static org.apache.doris.spark.cfg.ConfigurationOptions.DORIS_TABLET_SIZE_DEFAULT;
Expand All @@ -26,7 +25,6 @@
import static org.hamcrest.core.StringStartsWith.startsWith;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -307,7 +305,7 @@ public void testTabletsMapToPartition() throws Exception {
settings, beToTablets, opaquedQueryPlan, database, table, logger);
Collections.sort(actual);

Assert.assertTrue(ListUtils.isEqualList(expected, actual));
Assert.assertEquals(expected, actual);
}

@Deprecated
Expand Down

0 comments on commit b10eb47

Please sign in to comment.