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

SQL: Use new testing framework #101774

Merged
merged 19 commits into from
Nov 14, 2023

Conversation

alex-spies
Copy link
Contributor

@alex-spies alex-spies commented Nov 3, 2023

Port the following test suites from legacy-java-rest-test to internal-java-rest-test:

  • x-pack/plugin/sql/qa/server/:
    • single-node
    • multi-node
    • multi-cluster-with-security

Main changes:

  • Update the respective build.gradle files.
  • Add 3 new java files with the cluster definitions (as TestRules), one each for single-node, multi-node and multi-cluster-with-security.
  • Make a couple of methods non-static so they can be overridden.

A large part of the changes are mechanical.

Do not obtain node addresses directly from global property - use
getTestRestCluster instead. This is non-static, which requires
refactoring.
* dependencies but we don't really want them because they cause
* all kinds of trouble with the jar hell checks. So we suppress
* them explicitly for non-es projects. */
javaRestTestImplementation(project(':x-pack:plugin:sql:qa:server')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing below this line is new - only fixed indentation (was tripping me up, haha).

@alex-spies alex-spies added the :Analytics/SQL SQL querying label Nov 13, 2023
@alex-spies alex-spies marked this pull request as ready for review November 13, 2023 11:17
@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Nov 13, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@alex-spies
Copy link
Contributor Author

@elasticsearchmachine run Check labels

@astefan astefan requested a review from breskeby November 13, 2023 14:19
Copy link
Contributor

@luigidellaquila luigidellaquila left a comment

Choose a reason for hiding this comment

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

For my understanding it looks good, thanks Alex!
I just added a very minor comment

@alex-spies alex-spies merged commit c291e66 into elastic:main Nov 14, 2023
13 checks passed
@alex-spies alex-spies deleted the sql-new-testing-framework branch November 14, 2023 13:16
Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

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

lgtm.
FYI: I've updated the whitelist we keep in our build and removed those projects that have been converted here too #102297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >refactoring Team:QL (Deprecated) Meta label for query languages team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants