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

Switch ensureTestNamingConvention to run in JUnit to reduce test setups #19329

Conversation

findepi
Copy link
Member

@findepi findepi commented Oct 10, 2023

For many test classes, this it the last method that is not converted. For example, running TestInformationSchemaConnector with TestNG will run only this method. Moving this will make tests like TestInformationSchemaConnector JUnit-only and improve test overall time (fewer createQueryRunner invocations).

Obviously, it can be the first JUnit test method for some other classes, but

  • the train cannot be stopped. We do this sooner or later.
  • AbstractTestQueries are already JUnit; BaseConnectorTest extends from AbstractTestQueries and BaseConnectorTest are most likely to most expensive setups, because they create dependant services.

For many test classes, this it the last method that is not converted.
For example, running `TestInformationSchemaConnector` with TestNG will
run only this method. Moving this will make tests like
`TestInformationSchemaConnector` JUnit-only and improve test overall
time (fewer `createQueryRunner` invocations).

Obviously, it can be the first JUnit test method for some other classes,
but

- the train cannot be stopped. We do this sooner or later.
- `AbstractTestQueries` are already JUnit; `BaseConnectorTest` extends
  from `AbstractTestQueries` and `BaseConnectorTest` are most likely to
most expensive setups, because they create dependant services.
Copy link
Contributor

@findinpath findinpath left a comment

Choose a reason for hiding this comment

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

Tested with

./mvnw -Dtest=io.trino.plugin.deltalake.TestDeltaLakeCreateTableInternalRetry test -pl :trino-delta-lake

and indeed there are no more testng tests (neither the setup overhead) now executed.

@findepi findepi merged commit 6858091 into trinodb:master Oct 10, 2023
@findepi findepi deleted the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-40a721 branch October 10, 2023 12:27
@github-actions github-actions bot added this to the 429 milestone Oct 10, 2023
@findepi
Copy link
Member Author

findepi commented Oct 13, 2023

This had to be reverted, so here it comes again -- #19400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants