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

[FLINK-24129][connectors-pulsar] Harden TopicRangeTest.rangeCreationH… #17159

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

dmvk
Copy link
Member

@dmvk dmvk commented Sep 6, 2021

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 :))

@flinkbot
Copy link
Collaborator

flinkbot commented Sep 6, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 537432a (Mon Sep 06 09:46:25 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Sep 6, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@XComp XComp left a 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? 🤔

@dmvk
Copy link
Member Author

dmvk commented Sep 7, 2021

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.

@dmvk
Copy link
Member Author

dmvk commented Sep 7, 2021

@XComp changed, PTAL

Copy link
Contributor

@XComp XComp left a 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. 👍

@syhily
Copy link
Contributor

syhily commented Sep 7, 2021

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? 🤔

It's unnecessary to use repeat test, we can just remove it. Pass 0 is the issue, I think we can just remove the random number.

@XComp
Copy link
Contributor

XComp commented Sep 7, 2021

It's unnecessary to use repeat test, we can just remove it. Pass 0 is the issue, I think we can just remove the random number.

Thanks for your confirmation, @syhily 👍

@dmvk
Copy link
Member Author

dmvk commented Sep 16, 2021

@XComp Thanks for the review, I've addressed your comments, PTAL

Copy link
Contributor

@XComp XComp left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@syhily
Copy link
Contributor

syhily commented Sep 17, 2021

LGTM

@syhily
Copy link
Contributor

syhily commented Sep 17, 2021

@XComp This PR should also be merged into release-1.14.

@XComp
Copy link
Contributor

XComp commented Sep 17, 2021

@syhily Good point. I created #17312 as the backport PR for FLINK-24129.

@rmetzger
Copy link
Contributor

Thanks for the fix & review. Merging ...

@rmetzger rmetzger merged commit e18d273 into apache:master Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants