kubernetes-client / kubernetes-client/java

[Umbrella Issue] Many tests use Thread.sleep instead of synchronization primitives

Offen
#1,223 15 Kommentare 1 Reaktion 3 zugewiesene Personen Beansprucht von @tmrpavan Auf GitHub ansehen
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

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.