-
Notifications
You must be signed in to change notification settings - Fork 3k
Thread.sleep() method is replaced with Awaitility #8725
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
Thread.sleep() method is replaced with Awaitility #8725
Conversation
.../v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestStreamingMonitorFunction.java
Outdated
Show resolved
Hide resolved
.../v1.15/flink/src/test/java/org/apache/iceberg/flink/source/TestStreamingMonitorFunction.java
Outdated
Show resolved
Hide resolved
...k/v1.16/flink/src/test/java/org/apache/iceberg/flink/source/TestIcebergSourceContinuous.java
Outdated
Show resolved
Hide resolved
| Assert.assertTrue( | ||
| "Should have expected elements.", latch.await(WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS)); | ||
| Thread.sleep(1000L); | ||
| Awaitility.await().atLeast(1, TimeUnit.SECONDS).until(() -> true); |
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.
this goes back to my earlier comment here. We don't want to blindly just change Thread.sleep usage to Awaitility
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.
I am new to open source , will it be ok if i replace this with simply Awaitility.await()
.atMost(WAIT_TIME_MILLIS, TimeUnit.MILLISECONDS)
.pollInterval(100, TimeUnit.MILLISECONDS)
.until(() -> latch.getCount() == 0); @nastra or suggest changes please.
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.
@shreyanshR7 , I also tried to make a fix for this here . You can still continue on flink module.
|
Closing this one as it has been superseded by #8804 |
@nastra