kubernetes-client / kubernetes-client/java
[Umbrella Issue] Many tests use Thread.sleep instead of synchronization primitives
Offen
good first issue
lifecycle/frozen
- Vorherrschende Sprache
- Java
- Sterne
- 4k
- Forks
- 2.1k
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 16
Beschreibung
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
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.