oleg-vlsk commented on code in PR #11349:
URL: https://github.com/apache/ignite/pull/11349#discussion_r1609064394


##########
modules/indexing/src/test/java/org/apache/ignite/cache/query/ThinClientIndexQueryTest.java:
##########
@@ -224,14 +228,43 @@ public void testPageSize() {
             for (int pageSize: F.asList(1, 10, 100, 1000, 10_000)) {
                 idxQry.setPageSize(pageSize);
 
-                
TestRecordingCommunicationSpi.spi(grid(0)).record(GridQueryNextPageRequest.class);
+                for (int i = 0; i < NODES; i++) {
+                    TestRecordingCommunicationSpi.spi(grid(i)).record(
+                        GridCacheQueryRequest.class,
+                        GridCacheQueryResponse.class);
+                }
 
                 assertClientQuery(cache, NULLS_CNT, CNT, idxQry);
 
-                List<Object> reqs = 
TestRecordingCommunicationSpi.spi(grid(0)).recordedMessages(true);
+                int nodeOneEntries = cache.query(new ScanQuery<Integer, 
Person>().setLocal(true)).getAll().size();
+                int nodeTwoEntries = (CNT - NULLS_CNT) - nodeOneEntries;
+
+                int nodeOneLastPageEntries = nodeOneEntries % pageSize;
+                int nodeTwoLastPageEntries = nodeTwoEntries % pageSize;
+
+                List<Object> msgs = new ArrayList<>();
+
+                for (int i = 0; i < NODES; i++)
+                    
msgs.addAll(TestRecordingCommunicationSpi.spi(grid(i)).recordedMessages(true));
+
+                assert pageSize >= (CNT - NULLS_CNT) || !msgs.isEmpty();

Review Comment:
   Check removed. It was a shorter version for 
   ```
   if (pageSize < CNT)
       assert !reqs.isEmpty();
   ```
   But since we decided not to filter out query initiation requests, the 'reqs' 
collection will never be empty.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to