This is an automated email from the ASF dual-hosted git repository.
junhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 241fb8fe7 [test] Fix flaky test in
`KeyValueFileStoreScanTest.testWithValueFilter` (#3109)
241fb8fe7 is described below
commit 241fb8fe7b3f2e9c9a3884a755a079cb5fe9cbca
Author: Zouxxyy <[email protected]>
AuthorDate: Thu Mar 28 13:28:26 2024 +0800
[test] Fix flaky test in `KeyValueFileStoreScanTest.testWithValueFilter`
(#3109)
---
.../apache/paimon/operation/KeyValueFileStoreScanTest.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git
a/paimon-core/src/test/java/org/apache/paimon/operation/KeyValueFileStoreScanTest.java
b/paimon-core/src/test/java/org/apache/paimon/operation/KeyValueFileStoreScanTest.java
index 7f1fc0d3c..8ea35082a 100644
---
a/paimon-core/src/test/java/org/apache/paimon/operation/KeyValueFileStoreScanTest.java
+++
b/paimon-core/src/test/java/org/apache/paimon/operation/KeyValueFileStoreScanTest.java
@@ -150,13 +150,17 @@ public class KeyValueFileStoreScanTest {
@Test
public void testWithValueFilter() throws Exception {
ThreadLocalRandom random = ThreadLocalRandom.current();
- List<KeyValue> data = generateData(100,
Math.abs(random.nextInt(1000)));
+ // 0 <= hr <= 999
+ List<KeyValue> data = generateData(100, random.nextInt(1000));
writeData(data, 0);
- data = generateData(100, Math.abs(random.nextInt(1000)) + 1000);
+ // 1000 <= hr <= 1999
+ data = generateData(100, random.nextInt(1000) + 1000);
writeData(data, 1);
- data = generateData(100, Math.abs(random.nextInt(1000)) + 2000);
+ // 2000 <= hr <= 2999
+ data = generateData(100, random.nextInt(1000) + 2000);
writeData(data, 2);
- generateData(100, Math.abs(random.nextInt(1000)) + 3000);
+ // 3000 <= hr <= 3999
+ data = generateData(100, random.nextInt(1000) + 3000);
Snapshot snapshot = writeData(data, 3);
KeyValueFileStoreScan scan = store.newScan();
@@ -167,7 +171,7 @@ public class KeyValueFileStoreScanTest {
scan.withSnapshot(snapshot.id());
scan.withValueFilter(
new PredicateBuilder(TestKeyValueGenerator.DEFAULT_ROW_TYPE)
- .between(1, 1000, 2000));
+ .between(1, 1000, 1999));
List<ManifestEntry> filesFiltered = scan.plan().files();