timoninmaxim commented on a change in pull request #9407:
URL: https://github.com/apache/ignite/pull/9407#discussion_r715564366
##########
File path:
modules/indexing/src/test/java/org/apache/ignite/cache/query/IndexQueryQueryEntityTest.java
##########
@@ -113,44 +131,46 @@
/** */
@Test
public void testEmptyCache() {
- IndexQuery<Long, Person> qry = new IndexQuery<Long,
Person>(Person.class, ID_IDX)
+ IndexQuery<Long, Person> qry = new IndexQuery<Long,
Person>(Person.class, qryIdx)
.setCriteria(lt("id", Integer.MAX_VALUE));
assertTrue(cache.query(qry).getAll().isEmpty());
- qry = new IndexQuery<Long, Person>(Person.class, DESC_ID_IDX)
+ qry = new IndexQuery<Long, Person>(Person.class, qryDescIdx)
.setCriteria(lt("descId", Integer.MAX_VALUE));
assertTrue(cache.query(qry).getAll().isEmpty());
- // Wrong fields in query.
- GridTestUtils.assertThrows(null, () -> {
- IndexQuery<Long, Person> wrongQry = new IndexQuery<Long,
Person>(Person.class, DESC_ID_IDX)
- .setCriteria(lt("id", Integer.MAX_VALUE));
+ if (qryIdx != null) {
Review comment:
This test checks if index name is specified (DESC_IDX) and wrong field
(id) is provided and Ignite will not start a query on wrong index. If `idxName
== null` Ignite will find a correct index by field (IDX), and exception will
not be thrown
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]