-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Umbrella Issue] Many tests use Thread.sleep instead of synchronization primitives #1223
Comments
|
@brendandburns thanks for sorting out these potentially flaking tests.. will fix them later! /assign |
I would like to help :-) |
@sarveshkaushal we'd welcome the help. In most cases the See an example PR #1219 The reason that |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
If still available I would like to contribute |
well i am new to java and i would like to get in touch with you guys and try to do my best in solving all the issues hope you all will understand my curiosity and get in touch with me and help me to grow and learn......... |
@brendandburns I have one doubt, I was working on java/util/src/test/java/io/kubernetes/client/informer/cache/SharedProcessorTest.java Lines 27 to 60 in 536f725
I can create a semaphore and acquire it, blocking the main thread, but how will I release so that blocked main thread will continue the execution, I looked at many tests, facing similar problem in many of them. Edit- |
what are the things I need to learn in order to start contributiing to this project? |
DSA, API, and Kubernetes or just contribute by documentation correction or making better changes |
@brendandburns ping |
/assign |
Many of our tests simply have a
Thread.sleep(duration)
when testing multi-threaded code. This is inherently flaky.Instead we should use synchronization classes (generally
Semaphore
) to synchronized the tests which is both faster in the general case and not flaky in the extreme case.See for instance #1218 and #1219
The text was updated successfully, but these errors were encountered: