pavlukhin commented on a change in pull request #6917: IGNITE-12189 
Implementation correct limit for TextQuery
URL: https://github.com/apache/ignite/pull/6917#discussion_r340566090
 
 

 ##########
 File path: 
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQuerySelfTest.java
 ##########
 @@ -120,28 +160,87 @@ public void testTextQueryWithKeepBinary() throws 
Exception {
         checkTextQuery(false, true);
     }
 
+    /**
+     * @throws Exception In case of error.
+     */
+    @Test
+    public void testTextQueryWithKeepBinaryLimited() throws Exception {
+        checkTextQuery(null, QUERY_LIMIT, false, true);
+    }
+
     /**
      * @throws Exception In case of error.
      */
     @Test
     public void testTextQuery() throws Exception {
-        checkTextQuery(false, true);
+        checkTextQuery(false, false);
+    }
+
+    /**
+     * @throws Exception In case of error.
+     */
+    @Test
+    public void testTextQueryLimited() throws Exception {
+        checkTextQuery(null, QUERY_LIMIT, false, false);
+    }
+
+    /**
+     * @throws Exception In case of error.
+     */
+    @Test
+    public void testTextQueryLimitedConcurrent() throws Exception {
+        final IgniteEx ignite = grid(0);
+
+        final String clause = "1*";
+
+        // 1. Populate cache with data, calculating expected count in parallel.
+        Set<Integer> exp = populateCache(ignite, false, MAX_ITEM_COUNT, 
(IgnitePredicate<Integer>)x -> String.valueOf(x).startsWith("1"));
+
+        ExecutorService executor = Executors.newFixedThreadPool(N_THREADS);
+
+        IntStream.range(0, N_THREADS).forEach((i) -> 
executor.submit(textQueryTask(ignite, clause, exp)));
+
+        executor.shutdown();
+        executor.awaitTermination(1, TimeUnit.MINUTES);
+
+        clearCache(ignite);
+    }
+
+    /**
+     * Creates Runnable for TextQuery
+     *
+     * @param ignite Ignite insance.
+     * @param clause Query clause.
+     * @param exp Expected results for validation.
+     * @return TextQuery and validation wrapped into Runnable functional 
interface.
+     */
+
 
 Review comment:
   Extra empty line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to