-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-22215 Fix for ThinClientIndexQueryTest#testPageSize #11349
Conversation
.collect(Collectors.toList())); | ||
} | ||
|
||
assert pageSize >= CNT || !reqs.isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageSize
is the param of the test, why do you check it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a shorter version of
if (pageSize < CNT)
assert !reqs.isEmpty();
where we need to make sure that if the page size is less than the number of entries, then the collection of messages must not be empty.
reqs.addAll(TestRecordingCommunicationSpi.spi(grid(i)).recordedMessages(true) | ||
.stream() | ||
.map(o -> (GridCacheQueryRequest)o) | ||
.filter(o -> o.type() == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This filter doesn't affect test results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The processing of messages has been changed altogether as another check for GridCacheQueryResponse
messages has been added.
for (int i = 0; i < NODES; i++) | ||
msgs.addAll(TestRecordingCommunicationSpi.spi(grid(i)).recordedMessages(true)); | ||
|
||
assert pageSize >= (CNT - NULLS_CNT) || !msgs.isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you check pageSize? You set values for the pageSize in 228L
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
assert reqs.size() == resp.size(); | ||
|
||
for (int i = 0; i < reqs.size(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's check that reqs size is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for the expected size of the 'reqs' collection added.
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summary
whereXXXX
- number of JIRA issue.(see the Maintainers list)
the
green visa
attached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.