iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Replace Thread.sleep() usage in test code with Awaitility

Open nastra opened this issue 2 years ago • 21 comments

Feature Request / Improvement

It would be great to re-visit all Thread.sleep() usages in the test code and see which can be converted to Awaitility

Query engine

None

nastra avatar Mar 21 '23 07:03 nastra

Could you assgin it to me?

zhaomin1423 avatar Mar 23 '23 13:03 zhaomin1423

@zhaomin1423 do you still plan to work on this?

jackye1995 avatar Apr 26 '23 21:04 jackye1995

@zhaomin1423 do you still plan to work on this?

Sorry for the late reply, I am busy recently, I am willing to do it, if this affects the progress, you can reassign it.

zhaomin1423 avatar May 04 '23 16:05 zhaomin1423

Can you assign this task to me?

xiaochen-zhou avatar May 17 '23 09:05 xiaochen-zhou

@clownxc are you still working on this ?

coded9 avatar Jul 14 '23 16:07 coded9

Hi, @clownxc, any update with this? Hi, @nastra, i want to have to try if no one works on this now.

liuxiaocs7 avatar Jul 18 '23 11:07 liuxiaocs7

Hi, @clownxc, any update with this? Hi, @nastra, i want to have to try if no one works on this now.

Sorry, I'm sorry. I was too busy a while ago and I'm still happy to do it. I can finish it by this week. Sorry again @coded9 @nastra

xiaochen-zhou avatar Aug 14 '23 09:08 xiaochen-zhou

Let me know if you need a hand @clownxc

coded9 avatar Aug 14 '23 10:08 coded9

Let me know if you need a hand @clownxc

Sorry, I was on a business trip recently, sorry again for not being able to complete this task on time, you can reassign this task to other interested people @coded9 @liuxiaocs7 @nastra

xiaochen-zhou avatar Aug 23 '23 10:08 xiaochen-zhou

I will pick it up then, @nastra could you assign to me ?

coded9 avatar Aug 24 '23 05:08 coded9

@coded9 have you solved the issue , I am new to this i want to contribute to this

KirtiKamal avatar Aug 25 '23 15:08 KirtiKamal

@nastra I just wanted to understand the benefits of Awaitility in place of sleep

atifiu avatar Aug 27 '23 18:08 atifiu

@nastra I just wanted to understand the benefits of Awaitility in place of sleep

With a fixed sleep in tests you might wait too long or too short for a condition to happen, which results in either long or flaky tests. With awaitility you can fluently add retry behavior to make tests shorter and more robust.

nastra avatar Sep 04 '23 11:09 nastra

shall i start working on this if it is not worked or picked up

gzagarwal avatar Oct 01 '23 09:10 gzagarwal

@gzagarwal you might want to talk to @coded9 as he also wanted to work on this, although I don't know the current state of this

nastra avatar Oct 02 '23 08:10 nastra

okay let me find something else.

gzagarwal avatar Oct 03 '23 16:10 gzagarwal

@nastra I tried to implement the above method.

shreyanshR7 avatar Oct 04 '23 16:10 shreyanshR7

@nastra please consider the pr #8725

shreyanshR7 avatar Oct 06 '23 15:10 shreyanshR7

I've opened https://github.com/apache/iceberg/pull/8853 and https://github.com/apache/iceberg/pull/8852 to give an idea about places that are good candidates to replace with Awaitility. I believe there are more similar places in the codebase that can be fixed as part of #7154

nastra avatar Oct 17 '23 16:10 nastra

I think a few other places that would be good to address are all places that use https://github.com/apache/iceberg/blob/main/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/SparkRowLevelOperationsTestBase.java#L331

nastra avatar Oct 30 '23 11:10 nastra

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] avatar Aug 28 '24 00:08 github-actions[bot]

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'

github-actions[bot] avatar Sep 12 '24 00:09 github-actions[bot]