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
[FLINK-27885][tests][JUnit5 migration] flink-csv #19897
base: master
Are you sure you want to change the base?
Conversation
49c8014
to
fcfc82d
Compare
Rebased with no additional code changes. |
flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatFactoryTest.java
Outdated
Show resolved
Hide resolved
Thanks for the contribution @RyanSkraba
|
Thanks for the review -- I've addressed the comments, except for I typically leave these to be migrated at the same time later (and in this case will likely be a big undertaking as there are at least 76 classes in the hierarchy). |
...ts/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvRowDeSerializationSchemaTest.java
Show resolved
Hide resolved
thanks for addressing comments I wonder if in this case there should be a dedicated follow up task created to fix that... Also cc @XComp may be you have some clue about that? |
Theoretically, we might want to link FLINK-27885 with FLINK-29541. I guess, mentioning in FLINK-29541 that files in other modules need to be migrated as well is sufficient enough. 🤔 |
|
||
@Override | ||
@BeforeEach | ||
public void setup(@TempDir File file) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since the hierarchy is in different packages package private does not work here however probably it could be either changed to protected
for the whole hierarchy or marked like @VisibleForTestting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is true, but I'd prefer to avoid @VisibleForTesting
for classes in the src/test/java
hierarchy... There are a few places in the Flink code where I've seen this, but it's pretty rare and probably not what the contributor really intended!
I'll change it to protected. Sorry, I misread -- this can't be changed to protected without changing the entire hierarchy of tests that depend on it across many modules.
Hello! I missed replying to this last comment -- my strategy for tests that are part of a large (or in this case, very large hierarchy) of related, cross-modules tests is to:
I don't see any satisfying incremental approach to cross-module JUnit tests otherwise. I have no objection to leaving the JIRA open of course! Two PRs can address a single JIRA. |
2530d67
to
ce69d92
Compare
Hello! I've rebased this PR to master. I don't believe there are any remaining requested changes that I haven't addressed (by comment or other). I will be mostly away from my computer for a couple of weeks, but I'll check in if anything changes! |
ce69d92
to
6c7bde1
Compare
Hello! I've rebased this PR, did a quick check for changes that may have occurred on master in the meantime, and did some JIRA secretarial work for tracking the changes that were left for later. Thanks! |
...mats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatStatisticsReportTest.java
Show resolved
Hide resolved
...mats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFormatStatisticsReportTest.java
Show resolved
Hide resolved
flink-clients/src/test/resources/META-INF/services/org.junit.jupiter.api.extension.Extension
Outdated
Show resolved
Hide resolved
6c7bde1
to
b3d52f7
Compare
b3d52f7
to
2bdf90e
Compare
What is the purpose of the change
Update the
flink-formats/flink-csv
module to AssertJ and JUnit 5 following the JUnit 5 Migration GuideI used the https://github.com/slinkydeveloper/assertj-migrator as the starting point
Most of the AssertJ work was already finished on this module, with some exceptions around error handling.
There are some tests that still depend on JUnit4 test base classes outside this module. These cross-module tests should probably be simultaneously migrated in a separate PR.
I've verified that there are 132 tests run before and after the refactoring.
Brief change log
Verifying this change
This change is a code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation
Brief change log
(for example:)