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 #19400

Conversation

findepi
Copy link
Member

@findepi findepi commented Oct 13, 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.

Resubmitting #19329 from within the repo.

@findinpath
Copy link
Contributor

Build is 🔴

[INFO] Running io.trino.plugin.deltalake.TestDeltaLakeConnectorTest
Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.023 s <<< FAILURE! -- in io.trino.plugin.deltalake.TestDeltaLakeConnectorTest
Error:  io.trino.plugin.deltalake.TestDeltaLakeConnectorTest -- Time elapsed: 0.023 s <<< ERROR!
Failed to instantiate io.trino.plugin.deltalake.TestDeltaLakeConnectorTest due to missing @Test annotation on the following methods:
    'public void io.trino.testing.BaseConnectorTest.ensureTestNamingConvention()', which overrides 'public void io.trino.testing.AbstractTestQueryFramework.ensureTestNamingConvention()'

@findepi findepi force-pushed the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch 2 times, most recently from 28dee7c to ee4d245 Compare October 16, 2023 13:58
@findepi findepi requested review from wendigo and hashhar and removed request for wendigo October 16, 2023 13:59
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM assuming a green build

@findepi findepi force-pushed the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch from ee4d245 to f7102a8 Compare October 17, 2023 07:04
@github-actions github-actions bot added tests:hive hive Hive connector labels Oct 17, 2023
@findepi findepi force-pushed the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch from f7102a8 to e1eea40 Compare October 17, 2023 07:08
@github-actions github-actions bot added iceberg Iceberg connector delta-lake Delta Lake connector bigquery BigQuery connector labels Oct 17, 2023
@findepi findepi force-pushed the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch from e1eea40 to 2ab7c28 Compare October 17, 2023 08:47
@wendigo
Copy link
Contributor

wendigo commented Oct 17, 2023

LGTM. I've restarted two failing jobs (timed out)

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.
@findepi findepi force-pushed the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch from 2d816b5 to 5d1bd01 Compare October 17, 2023 11:21
@findepi
Copy link
Member Author

findepi commented Oct 17, 2023

( rebased after #19421 merged )

Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jan 10, 2024
@mosabua
Copy link
Member

mosabua commented Jan 11, 2024

I assume you will continue with this when you get a chance @findepi

@github-actions github-actions bot removed the stale label Jan 12, 2024
Copy link

github-actions bot commented Feb 2, 2024

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Feb 2, 2024
@findepi findepi closed this Feb 5, 2024
@findepi findepi deleted the findepi/switch-ensuretestnamingconvention-to-run-in-junit-to-reduce-test-setups-c67aa0 branch February 5, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery BigQuery connector cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector stale
Development

Successfully merging this pull request may close these issues.

5 participants