Skip to content

Conversation

@leonardBang
Copy link
Contributor

backport PR for release-3.2 branch


private static void waitForSinkSize(String sinkName, int expectedSize)
throws InterruptedException {
while (sinkSize(sinkName) < expectedSize) {

Choose a reason for hiding this comment

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

I am concerned that if sinkSize(sinkName) is incorrectly less than expectedSize then we have an infinite loop.

I suggest having a time out on the while loop to ensure they complete in failure conditions after say 30 seconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch and will adjust later, but as it's an existed method thus I tend to improve the tests infra in later PR, HDYT?

Copy link
Contributor

@ruanhang1993 ruanhang1993 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants