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

Core, Spark: Migrate tests that depend on ScanTestBase to JUnit5 #9416

Merged
merged 9 commits into from
Jan 16, 2024

Conversation

chinmay-bhat
Copy link
Contributor

This PR migrates tests that depend on SparkDistributedDataScanTestBase to JUnit5.
SparkDistributedDataScanTestBase inherits from classes that ultimately inherit from TableTestBase.

TableTestBase uses JUnit4 imports and is the base class for atleast 90+ classes across flink, core, data, and spark. So I created ParameterizedTableTestBase, a version of TableTestBase migrated to JUnit5. This is similar to #9076

Issue: #9086

@chinmay-bhat
Copy link
Contributor Author

Based on the test failures, older spark versions depend on core files like DeleteFileIndexTestBase, ParameterizedTableTestBase, DataTableScanTestBase,ScanPlanningAndReportingTestBase, which have been updated to JUnit5 in this PR.

A possible solution would be to migrate the affected files in older versions to JUnit5 as well. That would be a task bigger than this PRs scope. Another solution would be to create JUnit5 versions of the above core files, but I'm not keen on creating unnecessary duplicates.

@nastra @Fokko
I faced a similar problem in #9382. Any advise would be great! :)

@chinmay-bhat chinmay-bhat force-pushed the junit5-spark-distributed-data-scan branch from 8b2c13c to 5bf3026 Compare January 9, 2024 16:40
@github-actions github-actions bot added the data label Jan 9, 2024
@chinmay-bhat
Copy link
Contributor Author

We have files that inherit from TestBase used in older Spark versions that are causing CI failure. Should I move them to JUnit5 like we did in #9382 ?

@nastra
Copy link
Contributor

nastra commented Jan 15, 2024

We have files that inherit from TestBase used in older Spark versions that are causing CI failure. Should I move them to JUnit5 like we did in #9382 ?

Yes that would probably be the best here

@chinmay-bhat
Copy link
Contributor Author

not sure why the one CI test is failing, all tests pass locally for me. Can you rerun the CI?

Copy link
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @chinmay-bhat for getting this done!

@nastra nastra changed the title Spark 3.5: Migrate tests that depend on SparkDistributedDataScanTestBase to JUnit5 Core, Spark: Migrate tests that depend on ScanTestBase to JUnit5 Jan 16, 2024
@nastra nastra merged commit ea30d36 into apache:main Jan 16, 2024
41 checks passed
@chinmay-bhat chinmay-bhat deleted the junit5-spark-distributed-data-scan branch January 16, 2024 09:38
geruh pushed a commit to geruh/iceberg that referenced this pull request Jan 26, 2024
adnanhemani pushed a commit to adnanhemani/iceberg that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants