timoninmaxim commented on code in PR #11349:
URL: https://github.com/apache/ignite/pull/11349#discussion_r1608341466


##########
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();
 
-                for (Object r: reqs)
-                    assertEquals(pageSize, 
((GridQueryNextPageRequest)r).pageSize());
+                List<GridCacheQueryRequest> reqs = getFilteredMessages(msgs, 
GridCacheQueryRequest.class);
+                List<GridCacheQueryResponse> resp = getFilteredMessages(msgs, 
GridCacheQueryResponse.class);
+
+                assert reqs.size() == resp.size();
+
+                for (int i = 0; i < reqs.size(); i++) {

Review Comment:
   let's check that reqs size is expected.



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