This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 4295e4e  Fix the flakiness of DictionaryBasedGroupKeyGeneratorTest 
(#6801)
4295e4e is described below

commit 4295e4e8fd26fba496aaeab5b27d23684cb6d6ec
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Thu Apr 15 18:27:55 2021 -0700

    Fix the flakiness of DictionaryBasedGroupKeyGeneratorTest (#6801)
    
    The test can be flaky because map might not be reset after running other 
tests
---
 .../groupby/DictionaryBasedGroupKeyGeneratorTest.java         | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git 
a/pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGeneratorTest.java
 
b/pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGeneratorTest.java
index f2ccf96..ecf80ea 100644
--- 
a/pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGeneratorTest.java
+++ 
b/pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGeneratorTest.java
@@ -18,8 +18,6 @@
  */
 package org.apache.pinot.core.query.aggregation.groupby;
 
-import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
-import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -425,12 +423,9 @@ public class DictionaryBasedGroupKeyGeneratorTest {
 
   @Test
   public void testMapDefaultValue() {
-    Long2IntOpenHashMap longMap = 
DictionaryBasedGroupKeyGenerator.THREAD_LOCAL_LONG_MAP.get();
-    assertEquals(longMap.get(0L), GroupKeyGenerator.INVALID_ID);
-
-    Object2IntOpenHashMap<DictionaryBasedGroupKeyGenerator.IntArray> 
intArrayMap =
-        DictionaryBasedGroupKeyGenerator.THREAD_LOCAL_INT_ARRAY_MAP.get();
-    assertEquals(intArrayMap.getInt(new 
DictionaryBasedGroupKeyGenerator.IntArray(new int[0])),
+    
assertEquals(DictionaryBasedGroupKeyGenerator.THREAD_LOCAL_LONG_MAP.get().defaultReturnValue(),
+        GroupKeyGenerator.INVALID_ID);
+    
assertEquals(DictionaryBasedGroupKeyGenerator.THREAD_LOCAL_INT_ARRAY_MAP.get().defaultReturnValue(),
         GroupKeyGenerator.INVALID_ID);
   }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to