-
Notifications
You must be signed in to change notification settings - Fork 13k
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-24129][connectors-pulsar] Harden TopicRangeTest.rangeCreationH… #17159
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 537432a (Mon Sep 06 09:46:25 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
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.
The change looks good to me. I verified that passing 0
is the issue. But I'm wondering why we actually run a repeated test here. @syhily why is it necessary to use random numbers here?
To me, it looks like we could split up this test method into three separate test methods that tests the three cases below range, within range and above range. Each of these tests would only be executed once with a static number. Or am I missing something? 🤔
You're correct, there is no reason for having a repeated test with random input here, I was thinking about this as well. I'll change it, this is just too hard to understand for what it actually tests. |
@XComp changed, PTAL |
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.
Thanks for addressing my comments, @dmvk . I have two remarks. Feel free to address them. The change looks good. 👍
.../src/test/java/org/apache/flink/connector/pulsar/source/enumerator/topic/TopicRangeTest.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/apache/flink/connector/pulsar/source/enumerator/topic/TopicRangeTest.java
Outdated
Show resolved
Hide resolved
It's unnecessary to use repeat test, we can just remove it. Pass |
Thanks for your confirmation, @syhily 👍 |
…aveALimitedScope.
@XComp Thanks for the review, I've addressed your comments, PTAL |
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.
LGTM 👍
LGTM |
@XComp This PR should also be merged into release-1.14. |
@syhily Good point. I created #17312 as the backport PR for FLINK-24129. |
Thanks for the fix & review. Merging ... |
Fix test instability - https://dataartisans.atlassian.net/browse/DECO-1174
Tests fails if
random.nextInt(10_000)
results to zero (not as unlikely as it seems :))