diff --git a/single/manager_test.go b/single/manager_test.go index d39febc07a41154f3cb164af1b4755325bcef332..a1658a0b733bb21df35e17deef53072a76f7cf21 100644 --- a/single/manager_test.go +++ b/single/manager_test.go @@ -186,6 +186,11 @@ func TestManager_StartProcesses_Stop(t *testing.T) { t.Errorf("Failed to close: %+v", err) } + // Wait for the stoppable to close + for !stop.IsStopped() { + time.Sleep(10 * time.Millisecond) + } + m.swb.(*switchboard.Switchboard).Speak(receiveMsg) timer := time.NewTimer(50 * time.Millisecond)