-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-50568][SS][TESTS] Fix KafkaMicroBatchSourceSuite to cover KafkaOffsetReaderConsumer
#49164
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
Conversation
dongjoon-hyun
left a comment
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.
Thank you for making a PR, @ostronaut . Could you file a JIRA issue and use it in the PR title with a prefix pattern, [SPARK-XXX]?
|
Nice finding! Shall we do this a bit differently? Let's leave the base test class as it is (using default), and rename the derived test class to refer to Consumer and set the flag explicitly. I'm even OK to have a base test class as abstract, and have two derived test classes having config set for each. Maybe this is much clearer? |
|
cc @gaborgsomogyi and @viirya too from the following |
viirya
left a comment
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.
Good catch!
|
Thanks for catching it! After adapting the suggestions from @HeartSaVioR it will be good to go. |
|
Thank you @HeartSaVioR for the review! I've refactored |
|
Hi @dongjoon-hyun. Good point, SPARK-50568 here it is! |
affd2bf to
8086241
Compare
KafkaMicroBatchSourceSuite to cover KafkaOffsetReaderConsumer
dongjoon-hyun
left a comment
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.
+1, LGTM.
HeartSaVioR
left a comment
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.
+1
|
Thanks! Merging to master. |
What changes were proposed in this pull request?
This was missed when the default value of configuration is changed via the following.
KafkaMicroBatchSourceSuite consists of set of different suites, where KafkaMicroBatchSourceSuiteBase based suite is defined. There are 4 implementations of this abstract class for now:
KafkaMicroBatchV1SourceSuite- V1 source that supposes to useKafkaOffsetReaderConsumerasKafkaOffsetReader.KafkaMicroBatchV2SourceSuite- V2 source that supposes to useKafkaOffsetReaderConsumerasKafkaOffsetReader.KafkaMicroBatchV1SourceWithAdminSuite- V1 source that usesKafkaOffsetReaderAdminasKafkaOffsetReader.KafkaMicroBatchV2SourceWithAdminSuite- V2 source that usesKafkaOffsetReaderAdminasKafkaOffsetReader.But
KafkaMicroBatchV1SourceSuiteandKafkaMicroBatchV2SourceSuiteare still running based onKafkaOffsetReaderAdmin, asUSE_DEPRECATED_KAFKA_OFFSET_FETCHINGisfalsebe default. By switching it totrueinbeforeAll, we make sure that correspondingKafkaOffsetReaderis in use.Why are the changes needed?
To improve unit tests coverage for
KafkaOffsetReaderConsumerDoes this PR introduce any user-facing change?
No.
How was this patch tested?
Unit Tests.
Was this patch authored or co-authored using generative AI tooling?
No.