Skip to content

Commit 7124a03

Browse files
dserfexiangfu0
andauthored
Fix a flaky test (#11771)
* Update NotFilterOperatorTest.java * Update patch based on developer's suggestion * Update NotFilterOperatorTest.java * Update NotFilterOperatorTest.java --------- Co-authored-by: Xiang Fu <[email protected]>
1 parent 10055ff commit 7124a03

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pinot-core/src/test/java/org/apache/pinot/core/operator/filter/NotFilterOperatorTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
import com.google.common.collect.ImmutableList;
2222
import java.util.Arrays;
2323
import java.util.Collections;
24-
import java.util.HashSet;
2524
import java.util.Iterator;
26-
import java.util.Set;
25+
import java.util.List;
2726
import org.apache.pinot.core.common.BlockDocIdIterator;
2827
import org.apache.pinot.segment.spi.Constants;
2928
import org.testng.Assert;
@@ -35,8 +34,7 @@ public class NotFilterOperatorTest {
3534
@Test
3635
public void testNotOperator() {
3736
int[] docIds1 = new int[]{2, 3, 10, 15, 16, 17, 18, 21, 22, 23, 24, 26, 28};
38-
Set<Integer> expectedResult = new HashSet();
39-
expectedResult.addAll(Arrays.asList(0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 19, 20, 25, 27, 29));
37+
List<Integer> expectedResult = Arrays.asList(0, 1, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 19, 20, 25, 27, 29);
4038
Iterator<Integer> expectedIterator = expectedResult.iterator();
4139
NotFilterOperator notFilterOperator = new NotFilterOperator(new TestFilterOperator(docIds1, 30), 30, false);
4240
BlockDocIdIterator iterator = notFilterOperator.nextBlock().getBlockDocIdSet().iterator();

0 commit comments

Comments
 (0)