Skip to content
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

Merged
merged 9 commits into from
May 27, 2024

Conversation

oleg-vlsk
Copy link
Contributor

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

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    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.

.collect(Collectors.toList()));
}

assert pageSize >= CNT || !reqs.isEmpty();
Copy link
Member

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?

Copy link
Contributor Author

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)
Copy link
Member

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

Copy link
Contributor Author

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();
Copy link
Member

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

Copy link
Contributor Author

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++) {
Copy link
Member

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.

Copy link
Contributor Author

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.

@timoninmaxim timoninmaxim merged commit 987d1a1 into apache:master May 27, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants