all: fix goroutine leaks in unit tests by adding 1-elem channel buffer (#20666)
This fixes a bunch of cases where a timeout in the test would leak a goroutine.
This commit is contained in:
@ -96,7 +96,7 @@ func TestSimulatedSleep(t *testing.T) {
|
||||
var (
|
||||
c Simulated
|
||||
timeout = 1 * time.Hour
|
||||
done = make(chan AbsTime)
|
||||
done = make(chan AbsTime, 1)
|
||||
)
|
||||
go func() {
|
||||
c.Sleep(timeout)
|
||||
|
Reference in New Issue
Block a user