In the test code, there are times when `time.Sleep` is used to wait for processes to complete. This testing can be pass or failure.
Such tests are referred to as flaky tests.
Flaky tests can be very stressful and are actually a waste of time.
As solutions, methods using retries or channels have been suggested.
These methods involve the use of mocks, which I think are excellent for testing interfaces, but there may be cases where they are not applicable.