-
Notifications
You must be signed in to change notification settings - Fork 135
IGNITE-20924 Add tests for parallel building of a new index and table updates #2860
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
Conversation
.../runner/src/testFixtures/java/org/apache/ignite/internal/ClusterPerClassIntegrationTest.java
Outdated
Show resolved
Hide resolved
| * @param tableName Table name. | ||
| * @param personIds Person IDs to delete. | ||
| */ | ||
| protected static void deletePersons(String tableName, int... personIds) { |
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.
It's a bit strange that these methods concerning some Person class are defined in a generic integration test class, they don't seem to belong here. I suggest moving them to another class (maybe as static methods, or this new helper might be instantiated in each test class that actually needs 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.
I don’t see the need to do this yet, let them stay here for now, then if the situation is too much, we’ll do it better.
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.
But they are only used in one integration test, is this true? If yet, then why keep them here?
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.
For now, yes, but I have plans to continue using them, I won’t change them for now, if necessary, we’ll change them later.
...index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexOneNodeTest.java
Outdated
Show resolved
Hide resolved
...index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexOneNodeTest.java
Outdated
Show resolved
Hide resolved
| createIndexForSalaryFieldAndWaitBecomeAvailable(); | ||
|
|
||
| assertThat(awaitIndexBecomeAvailableEventAsync, willCompleteSuccessfully()); | ||
| assertThat(insertIntoTableFuture, will(greaterThan(0))); |
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.
| assertThat(insertIntoTableFuture, will(greaterThan(0))); | |
| assertThat(insertIntoTableFuture, willBe(greaterThan(0))); |
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.
It's the same thing, I'll leave it as it is.
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.
It behaves in the same way, but it reads better ('will greater than' is broken English, 'will be greater than' is grammatically correct). One of the reasons Hamcrest became so popular is that it allows to write assertions almost in plain English, using the real grammar.
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.
My English grammar is lame, it doesn’t matter to me and I’ll change it, but most likely I won’t remember it.
https://issues.apache.org/jira/browse/IGNITE-20924
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review 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 description of the JIRA ticket explains WHAT was made, WHY and 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.
Notes