Skip to content

Conversation

@tkalkirill
Copy link
Contributor

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

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - 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.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

* @param tableName Table name.
* @param personIds Person IDs to delete.
*/
protected static void deletePersons(String tableName, int... personIds) {
Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

createIndexForSalaryFieldAndWaitBecomeAvailable();

assertThat(awaitIndexBecomeAvailableEventAsync, willCompleteSuccessfully());
assertThat(insertIntoTableFuture, will(greaterThan(0)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assertThat(insertIntoTableFuture, will(greaterThan(0)));
assertThat(insertIntoTableFuture, willBe(greaterThan(0)));

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@tkalkirill tkalkirill merged commit 07e208d into apache:main Nov 24, 2023
@tkalkirill tkalkirill deleted the ignite-20924 branch November 24, 2023 07:20
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.

2 participants