[FLINK-27941][connectors/aws] Migrate remaining tests to JUnit 5#244
Open
jlalwani-amazon wants to merge 1 commit into
Open
[FLINK-27941][connectors/aws] Migrate remaining tests to JUnit 5#244jlalwani-amazon wants to merge 1 commit into
jlalwani-amazon wants to merge 1 commit into
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html) |
gguptp
approved these changes
Apr 28, 2026
53c7e9a to
b62fb97
Compare
Complete JUnit 5 migration for the remaining test files: - GlueSchemaRegistryAvroKinesisITCase: @ClassRule -> @container, Assume -> Assumptions, remove extends TestLogger, fix log -> LOGGER - GlueSchemaRegistryJsonKinesisITCase: fix log -> LOGGER - SqsSinkITTest: @ClassRule -> @container, lifecycle annotations - KinesisFirehoseTableITTest: @rule Timeout -> @timeout, @container - KinesisStreamsTableApiIT: @rule Timeout -> @timeout, lifecycle - KinesisDynamicTableSourceFactoryTest: import ordering No test logic changes. Zero JUnit 4 imports remaining.
b62fb97 to
153e4b7
Compare
ferenc-csaky
requested changes
May 14, 2026
Contributor
ferenc-csaky
left a comment
There was a problem hiding this comment.
Mostly looks good, added 2 comments.
Comment on lines
+105
to
+110
| Assumptions.assumeTrue( | ||
| !StringUtils.isNullOrWhitespaceOnly(ACCESS_KEY), | ||
| "Access key not configured, skipping test..."); | ||
| Assumptions.assumeTrue( | ||
| !StringUtils.isNullOrWhitespaceOnly(SECRET_KEY), | ||
| "Secret key not configured, skipping test..."); |
Contributor
There was a problem hiding this comment.
Let's use AssertJ's Assumptions.assumeThat. I'd prefer static import that method too, but that's maybe personal taste.
Same applies to GlueSchemaRegistryAvroKinesisITCase.
|
|
||
| /** Test for {@link KinesisDynamicSource} created by {@link KinesisDynamicTableFactory}. */ | ||
| public class KinesisDynamicTableSourceFactoryTest extends TestLogger { | ||
| public class KinesisDynamicTableSourceFactoryTest { |
Contributor
There was a problem hiding this comment.
To keep the TestLogger on JUnit5 there is a matching extension:
@ExtendWith(TestLoggerExtension.class)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Complete JUnit 5 migration for the remaining 6 test files in flink-connector-aws (FLINK-27941).
JIRA: FLINK-27941
Brief change log
KinesisDynamicTableSourceFactoryTest- import ordering fixGlueSchemaRegistryAvroKinesisITCase-@ClassRule→@Container/@Testcontainers,Assume→Assumptions, removeextends TestLoggerGlueSchemaRegistryJsonKinesisITCase- import ordering fix (already migrated)SqsSinkITTest-@ClassRule→@Container/@Testcontainers, lifecycle annotations, removeextends TestLoggerKinesisFirehoseTableITTest-@Rule Timeout→@Timeout,@ClassRule→@Container/@Testcontainers, removeextends TestLoggerKinesisStreamsTableApiIT-@Rule Timeout→@Timeout, lifecycle annotationsNo test logic changes. Zero JUnit 4 imports remaining after this PR.
Verifying this change
CI passed on fork: https://github.com/jlalwani-amazon/flink-connector-aws/actions
Unit tests (flink-connector-aws-kinesis-streams): 194 tests, 0 failures, 0 errors ✅
Full CI: All jobs green (JDK 11, JDK 17, python tests) ✅
Does this pull request potentially affect one of the following parts?