(ignite-3) branch main updated (41007ff42d -> d20ec21a79)

2024-06-03 Thread korlov
This is an automated email from the ASF dual-hosted git repository.

korlov pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 41007ff42d IGNITE-22395 Remove assertions for paranoid leak detection 
property (#3864)
 add d20ec21a79 IGNITE-22301 Fix test 
CatalogManagerSelfTest.alwaysWaitForActivationTime (#3861)

No new revisions were added by this update.

Summary of changes:
 .../org/apache/ignite/internal/catalog/CatalogManagerSelfTest.java | 7 +++
 1 file changed, 7 insertions(+)



(ignite-3) branch main updated: IGNITE-22395 Remove assertions for paranoid leak detection property (#3864)

2024-06-03 Thread ibessonov
This is an automated email from the ASF dual-hosted git repository.

ibessonov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
 new 41007ff42d IGNITE-22395 Remove assertions for paranoid leak detection 
property (#3864)
41007ff42d is described below

commit 41007ff42df58e9651aeb3f9e0e520a27d5ff093
Author: Phillippko 
AuthorDate: Mon Jun 3 17:05:50 2024 +0400

IGNITE-22395 Remove assertions for paranoid leak detection property (#3864)
---
 .../cli/ParanoidLeakDetectionLevelTest.java| 33 --
 .../ParanoidLeakDetectionLevelPropertyTest.java| 31 
 .../network/ParanoidLeakDetectionLevelTest.java| 33 --
 .../ignite/internal/IgniteIntegrationTest.java |  8 --
 4 files changed, 105 deletions(-)

diff --git 
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/ParanoidLeakDetectionLevelTest.java
 
b/modules/cli/src/test/java/org/apache/ignite/internal/cli/ParanoidLeakDetectionLevelTest.java
deleted file mode 100644
index 68770a9db0..00
--- 
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/ParanoidLeakDetectionLevelTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli;
-
-import static io.netty.util.ResourceLeakDetector.Level.PARANOID;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-
-import io.netty.util.ResourceLeakDetector;
-import org.junit.jupiter.api.Test;
-
-/** Test checking that leak detection level is set to PARANOID for CLI unit 
tests. */
-public class ParanoidLeakDetectionLevelTest {
-@Test
-public void testParanoidLeakDetectionLevel() {
-assertThat(ResourceLeakDetector.getLevel(), is(PARANOID));
-}
-}
diff --git 
a/modules/jdbc/src/test/java/org/apache/ignite/internal/jdbc/ParanoidLeakDetectionLevelPropertyTest.java
 
b/modules/jdbc/src/test/java/org/apache/ignite/internal/jdbc/ParanoidLeakDetectionLevelPropertyTest.java
deleted file mode 100644
index 1abab7214e..00
--- 
a/modules/jdbc/src/test/java/org/apache/ignite/internal/jdbc/ParanoidLeakDetectionLevelPropertyTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.jdbc;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-
-import org.junit.jupiter.api.Test;
-
-/** Test checking that leak detection level property is set to PARANOID for 
JDBC unit tests. */
-public class ParanoidLeakDetectionLevelPropertyTest {
-@Test
-public void testParanoidLeakDetectionLevelProperty() {
-assertThat(System.getProperty("io.netty.leakDetectionLevel"), 
is("paranoid"));
-}
-}
diff --git 
a/modules/network/src/test/java/org/apache/ignite/internal/network/ParanoidLeakDetectionLevelTest.java
 
b/modules/network/src/test/java/org/apache/ignite/internal/network/ParanoidLeakDetectionLevelTest.java
deleted file mode 100644
index 3f7d1046c1..00
--- 
a/modules/network/src/test/java/org/apache/ignite/internal/network/ParanoidLeakDetectionLevelTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for 

(ignite-3) branch main updated (7152f2c7ac -> 81db1d025a)

2024-06-03 Thread ibessonov
This is an automated email from the ASF dual-hosted git repository.

ibessonov pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 7152f2c7ac IGNITE-22355 TableManagerTest's static mocks from 
#mockManagersAndCreateTableWithDelay don't work properly (#3843)
 add 81db1d025a IGNITE-22058 Use paranoid leak detection in tests (#3826)

No new revisions were added by this update.

Summary of changes:
 buildscripts/java-integration-test.gradle |  3 ++-
 modules/cli/build.gradle  |  4 
 .../ignite/internal/cli/ParanoidLeakDetectionLevelTest.java}  | 11 +++
 .../java/org/apache/ignite/client/AbstractClientTest.java |  7 ---
 .../java/org/apache/ignite/client/PartitionAwarenessTest.java |  3 ---
 .../ignite/internal/testframework/BaseIgniteAbstractTest.java |  9 +
 modules/jdbc/build.gradle |  4 
 .../jdbc/ParanoidLeakDetectionLevelPropertyTest.java} |  9 +
 modules/network/build.gradle  |  4 
 ...iltInTypeTest.java => ParanoidLeakDetectionLevelTest.java} | 11 +++
 .../org/apache/ignite/internal/IgniteIntegrationTest.java |  8 
 11 files changed, 50 insertions(+), 23 deletions(-)
 copy 
modules/{network/src/test/java/org/apache/ignite/internal/network/serialization/BuiltInTypeTest.java
 => 
cli/src/test/java/org/apache/ignite/internal/cli/ParanoidLeakDetectionLevelTest.java}
 (70%)
 copy 
modules/{network/src/test/java/org/apache/ignite/internal/network/serialization/BuiltInTypeTest.java
 => 
jdbc/src/test/java/org/apache/ignite/internal/jdbc/ParanoidLeakDetectionLevelPropertyTest.java}
 (73%)
 copy 
modules/network/src/test/java/org/apache/ignite/internal/network/{serialization/BuiltInTypeTest.java
 => ParanoidLeakDetectionLevelTest.java} (70%)



(ignite-3) branch ignite-20650 updated (b39e1b7ab8 -> 1320254bd3)

2024-06-03 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-20650
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


 discard b39e1b7ab8 Client tuple tests.
 add 1320254bd3 Client tuple tests.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b39e1b7ab8)
\
 N -- N -- N   refs/heads/ignite-20650 (1320254bd3)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/ignite/client/ClientTupleTest.java |  1 +
 .../internal/table/MutableRowTupleAdapterTest.java | 18 +-
 2 files changed, 10 insertions(+), 9 deletions(-)



(ignite-3) branch ignite-20650 updated (56896aa05a -> b39e1b7ab8)

2024-06-03 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-20650
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 56896aa05a Fix Tuple.columnName method contract.
 add b39e1b7ab8 Client tuple tests.

No new revisions were added by this update.

Summary of changes:
 .../table/MutableTupleBinaryTupleAdapter.java  |   2 +-
 .../org/apache/ignite/client/ClientTupleTest.java  | 227 ++---
 .../internal/table/MutableRowTupleAdapterTest.java |  11 +-
 .../table/AbstractMutableTupleSelfTest.java|  52 ++---
 .../internal/table/AbstractTupleSelfTest.java  |   9 +-
 5 files changed, 87 insertions(+), 214 deletions(-)



(ignite-3) branch IGNITE-22272 created (now d03c541881)

2024-06-03 Thread mpochatkin
This is an automated email from the ASF dual-hosted git repository.

mpochatkin pushed a change to branch IGNITE-22272
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


  at d03c541881 IGNITE-22272 Rework Catalog API

This branch includes the following new commits:

 new d03c541881 IGNITE-22272 Rework Catalog API

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(ignite-3) 01/01: IGNITE-22272 Rework Catalog API

2024-06-03 Thread mpochatkin
This is an automated email from the ASF dual-hosted git repository.

mpochatkin pushed a commit to branch IGNITE-22272
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit d03c54188110bc1e1b0c75248a9edd879b14f073
Author: Mikhail Pochatkin 
AuthorDate: Mon Jun 3 15:19:20 2024 +0300

IGNITE-22272 Rework Catalog API
---
 .../src/main/java/org/apache/ignite/Ignite.java|  14 +-
 .../org/apache/ignite/catalog/IgniteCatalog.java   |  22 ++-
 .../java/org/apache/ignite/catalog/Options.java| 147 
 .../main/java/org/apache/ignite/catalog/Query.java |  11 +-
 modules/catalog-dsl/build.gradle   |   1 +
 .../ignite/internal/catalog/ItCatalogDslTest.java  |  53 
 .../internal/catalog/sql/AbstractCatalogQuery.java |  22 +--
 .../catalog/sql/CreateFromAnnotationsImpl.java |  23 +++-
 .../catalog/sql/CreateFromDefinitionImpl.java  |  33 +++--
 .../internal/catalog/sql/CreateIndexImpl.java  |  12 +-
 .../internal/catalog/sql/CreateTableImpl.java  |  14 +-
 .../internal/catalog/sql/CreateZoneImpl.java   |  12 +-
 .../ignite/internal/catalog/sql/DropTableImpl.java |  12 +-
 .../ignite/internal/catalog/sql/DropZoneImpl.java  |  12 +-
 .../internal/catalog/sql/IgniteCatalogSqlImpl.java |  45 ---
 .../apache/ignite/internal/catalog/sql/Name.java   |   3 +-
 .../ignite/internal/catalog/sql/QueryContext.java  |  20 +--
 .../ignite/internal/catalog/sql/TableZoneId.java}  |  37 +++--
 .../catalog/sql/CreateFromAnnotationsTest.java |  99 +++---
 .../catalog/sql/CreateFromDefinitionTest.java  |  58 +---
 .../internal/catalog/sql/CreateTableTest.java  | 150 ++---
 .../internal/catalog/sql/CreateZoneTest.java   |  41 ++
 .../ignite/internal/catalog/sql/DropTableTest.java |  21 +--
 .../ignite/internal/catalog/sql/DropZoneTest.java  |  21 +--
 .../ignite/internal/catalog/sql/QueryPartTest.java |  29 +---
 .../ignite/internal/client/TcpIgniteClient.java|   5 +-
 .../org/apache/ignite/client/fakes/FakeIgnite.java |   5 +-
 .../org/apache/ignite/internal/app/IgniteImpl.java |   5 +-
 28 files changed, 279 insertions(+), 648 deletions(-)

diff --git a/modules/api/src/main/java/org/apache/ignite/Ignite.java 
b/modules/api/src/main/java/org/apache/ignite/Ignite.java
index 21fd965a17..396d7fc546 100644
--- a/modules/api/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/api/src/main/java/org/apache/ignite/Ignite.java
@@ -20,7 +20,6 @@ package org.apache.ignite;
 import java.util.Collection;
 import java.util.concurrent.CompletableFuture;
 import org.apache.ignite.catalog.IgniteCatalog;
-import org.apache.ignite.catalog.Options;
 import org.apache.ignite.compute.ComputeJob;
 import org.apache.ignite.compute.IgniteCompute;
 import org.apache.ignite.network.ClusterNode;
@@ -85,22 +84,11 @@ public interface Ignite extends AutoCloseable {
  */
 CompletableFuture> clusterNodesAsync();
 
-/**
- * Returns {@link IgniteCatalog}, which can be used to create and execute 
SQL DDL queries from annotated classes or from fluent-style
- * builders.
- *
- * @param options Query options.
- * @return Catalog object.
- */
-IgniteCatalog catalog(Options options);
-
 /**
  * Returns {@link IgniteCatalog} with default options, which can be used 
to create and execute SQL DDL queries from annotated classes or
  * from fluent-style builders.
  *
  * @return Catalog object.
  */
-default IgniteCatalog catalog() {
-return catalog(Options.DEFAULT);
-}
+IgniteCatalog catalog();
 }
diff --git 
a/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java 
b/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
index 5fb7f277c6..0d50efe2a8 100644
--- a/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
+++ b/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
@@ -19,6 +19,7 @@ package org.apache.ignite.catalog;
 
 import org.apache.ignite.catalog.definitions.TableDefinition;
 import org.apache.ignite.catalog.definitions.ZoneDefinition;
+import org.apache.ignite.table.Table;
 
 /**
  * Provides the ability to create and execute SQL DDL queries from annotated 
classes or fluent builders. This is an example of the simple
@@ -145,7 +146,7 @@ public interface IgniteCatalog {
  * @param recordClass Annotated record class.
  * @return Query object.
  */
-Query create(Class recordClass);
+Table create(Class recordClass);
 
 /**
  * Creates a query object from the annotated key and value classes.
@@ -154,7 +155,7 @@ public interface IgniteCatalog {
  * @param valueClass Annotated value class.
  * @return Query object.
  */
-Query create(Class keyClass, Class valueClass);
+Table create(Class keyClass, Class valueClass);
 
 /**
  * Creates a query object from the table definition.
@@ -162,45 +163,40 @@ public interface 

(ignite-3) branch ignite-20650 updated (67eb4c3ee0 -> 56896aa05a)

2024-06-03 Thread amashenkov
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-20650
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


from 67eb4c3ee0 Tuple tests refactoring.
 add 56896aa05a Fix Tuple.columnName method contract.

No new revisions were added by this update.

Summary of changes:
 .../api/src/main/java/org/apache/ignite/table/Tuple.java   |  9 ++---
 .../src/main/java/org/apache/ignite/table/TupleImpl.java   |  7 ---
 .../ignite/internal/table/AbstractRowTupleAdapter.java |  2 +-
 .../ignite/internal/table/MutableRowTupleAdapterTest.java  |  6 --
 .../internal/table/AbstractMutableTupleSelfTest.java   |  2 +-
 .../ignite/internal/table/AbstractTupleSelfTest.java   | 14 +++---
 6 files changed, 23 insertions(+), 17 deletions(-)



(ignite-3) branch main updated: IGNITE-22355 TableManagerTest's static mocks from #mockManagersAndCreateTableWithDelay don't work properly (#3843)

2024-06-03 Thread sk0x50
This is an automated email from the ASF dual-hosted git repository.

sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
 new 7152f2c7ac IGNITE-22355 TableManagerTest's static mocks from 
#mockManagersAndCreateTableWithDelay don't work properly (#3843)
7152f2c7ac is described below

commit 7152f2c7ac2cf4aa945a3fc0bc6f3e5a619ea9c1
Author: Mikhail Efremov 
AuthorDate: Mon Jun 3 14:58:56 2024 +0600

IGNITE-22355 TableManagerTest's static mocks from 
#mockManagersAndCreateTableWithDelay don't work properly (#3843)
---
 .../internal/table/distributed/TableManagerTest.java | 20 +++-
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
index a99730b527..dcfad44ebc 100644
--- 
a/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
+++ 
b/modules/table/src/test/java/org/apache/ignite/internal/table/distributed/TableManagerTest.java
@@ -57,10 +57,9 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.nio.file.Path;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
+import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutorService;
@@ -73,7 +72,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Consumer;
 import java.util.function.LongFunction;
-import org.apache.ignite.internal.affinity.AffinityUtils;
 import org.apache.ignite.internal.affinity.Assignment;
 import org.apache.ignite.internal.affinity.Assignments;
 import org.apache.ignite.internal.catalog.CatalogManager;
@@ -155,6 +153,7 @@ import org.mockito.junit.jupiter.MockitoSettings;
 import org.mockito.quality.Strictness;
 
 /** Tests scenarios for table manager. */
+// TODO: test demands for reworking 
https://issues.apache.org/jira/browse/IGNITE-22388
 @ExtendWith({MockitoExtension.class, ConfigurationExtension.class})
 @MockitoSettings(strictness = Strictness.LENIENT)
 public class TableManagerTest extends IgniteAbstractTest {
@@ -180,6 +179,7 @@ public class TableManagerTest extends IgniteAbstractTest {
 private static final String ZONE_NAME = "zone1";
 
 /** Topology service. */
+// TODO: useless field for now 
https://issues.apache.org/jira/browse/IGNITE-22388
 @Mock
 private TopologyService ts;
 
@@ -724,27 +724,21 @@ public class TableManagerTest extends IgniteAbstractTest {
 return completedFuture(raftGrpSrvcMock);
 });
 
+// TODO: useless code 
https://issues.apache.org/jira/browse/IGNITE-22388
 when(ts.getByConsistentId(any())).thenReturn(new ClusterNodeImpl(
 UUID.randomUUID().toString(),
 consistentId,
 new NetworkAddress("localhost", 47500)
 ));
 
+// TODO: should be removed or reworked 
https://issues.apache.org/jira/browse/IGNITE-22388
 try (MockedStatic schemaServiceMock = 
mockStatic(SchemaUtils.class)) {
 schemaServiceMock.when(() -> 
SchemaUtils.prepareSchemaDescriptor(any()))
 .thenReturn(mock(SchemaDescriptor.class));
 }
 
-try (MockedStatic affinityServiceMock = 
mockStatic(AffinityUtils.class)) {
-ArrayList> assignment = new 
ArrayList<>(PARTITIONS);
-
-for (int part = 0; part < PARTITIONS; part++) {
-assignment.add(new ArrayList<>(Collections.singleton(node)));
-}
-
-affinityServiceMock.when(() -> 
AffinityUtils.calculateAssignments(any(), anyInt(), anyInt()))
-.thenReturn(assignment);
-}
+when(distributionZoneManager.dataNodes(anyLong(), anyInt(), anyInt()))
+.thenReturn(completedFuture(Set.of(NODE_NAME)));
 
 TableManager tableManager = createTableManager(tblManagerFut);
 



(ignite) branch master updated: IGNITE-22140 Add test for IndexQuery pagination (#11350)

2024-06-03 Thread timoninmaxim
This is an automated email from the ASF dual-hosted git repository.

timoninmaxim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
 new dfff5d7675e IGNITE-22140 Add test for IndexQuery pagination (#11350)
dfff5d7675e is described below

commit dfff5d7675ec30deba1b09acb388efdb7edc6da3
Author: oleg-vlsk <153691984+oleg-v...@users.noreply.github.com>
AuthorDate: Mon Jun 3 18:08:22 2024 +1000

IGNITE-22140 Add test for IndexQuery pagination (#11350)
---
 .../cache/query/IndexQueryPaginationTest.java  | 159 +
 .../ignite/cache/query/IndexQueryTestSuite.java|   3 +-
 .../cache/query/ThinClientIndexQueryTest.java  |   2 +-
 3 files changed, 162 insertions(+), 2 deletions(-)

diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/cache/query/IndexQueryPaginationTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/cache/query/IndexQueryPaginationTest.java
new file mode 100644
index 000..1e20a7b5b67
--- /dev/null
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/cache/query/IndexQueryPaginationTest.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache.query;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.TestRecordingCommunicationSpi;
+import org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest;
+import 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryResponse;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static 
org.apache.ignite.cache.query.ThinClientIndexQueryTest.getFilteredMessages;
+
+/** */
+@RunWith(Parameterized.class)
+public class IndexQueryPaginationTest extends GridCommonAbstractTest {
+/** */
+private static final int PAGE_SIZE = 512;
+
+/** */
+private static final int NODES = 2;
+
+/** */
+private Ignite grid;
+
+/** */
+private IgniteCache cache;
+
+/** */
+@Parameterized.Parameter
+public int entries;
+
+/** */
+@Parameterized.Parameters(name = "entries={0}")
+public static Object[] params() {
+return new Object[] {100, 1000, 5000, 10_000, 50_000, 100_000};
+}
+
+/** {@inheritDoc} */
+@Override protected void beforeTest() throws Exception {
+grid = startGrids(NODES);
+
+cache = grid.cache("cache");
+
+insertData(grid, cache, entries);
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTest() throws Exception {
+stopAllGrids();
+}
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String 
igniteInstanceName) throws Exception {
+CacheConfiguration ccfg = new 
CacheConfiguration("cache")
+.setIndexedTypes(Integer.class, Person.class)
+.setCacheMode(CacheMode.PARTITIONED);
+
+return super.getConfiguration(igniteInstanceName)
+.setCommunicationSpi(new TestRecordingCommunicationSpi())
+.setCacheConfiguration(ccfg);
+}
+
+/**
+ * Insert data into a cache.
+ *
+ * @param ignite Ignite instance.
+ * @param cache Cache.
+ * @param entries Number of entries.
+ */
+private void insertData(Ignite ignite, IgniteCache cache, 
int entries) {
+try (IgniteDataStreamer streamer = 
ignite.dataStreamer(cache.getName())) {
+for (int i = 0; i < entries; i++)
+streamer.addData(i, new Person(i));
+}
+}
+
+/**
+ * Check if the number and the size of next page requests and responses 
are correct while executing an index query.
+