Ban use of Thread.sleep()
in tests unless specifically approved
#1815
Labels
Thread.sleep()
in tests unless specifically approved
#1815
We add
await
-based pauses the don't slow down CI testing:https://github.com/hub4j/github-api/blob/main/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java#L574-L584
There are some timing based tests, but they are the exception. Most tests don't need to care.
We need to make
await()
an easily used test helper, enforce not callingThread.sleep()
unless specifically approved, and provide a helpful failure message regarding usingawait
.Perhaps also a
sleepWhenTakingSnapshot()
method. See #1810 for example of why.The text was updated successfully, but these errors were encountered: