Shorten test time

This commit is contained in:
Shiming Zhang 2021-06-30 09:48:26 +08:00
parent a42c066af7
commit 212ce7c287

View File

@ -351,14 +351,13 @@ func TestRestart(t *testing.T) {
t.Errorf("unexpected error: %v", err)
}
for i := 0; i != 5; i++ {
for i := 0; i != 3; i++ {
select {
case <-time.After(dbusReconnectPeriod * 5):
t.Fatal("wait dbus connect timeout")
case <-connChan:
}
time.Sleep(dbusReconnectPeriod)
shutdownChanMut.Lock()
close(shutdownChan)
shutdownChanMut.Unlock()