add retry to TestResetSessionTimerLocked

This commit is contained in:
Alvin Huang 2019-02-21 16:27:17 -05:00
parent 47e1c37fe6
commit 2e961d6539
1 changed files with 5 additions and 4 deletions

View File

@ -162,10 +162,11 @@ func TestResetSessionTimerLocked(t *testing.T) {
t.Fatalf("missing timer") t.Fatalf("missing timer")
} }
time.Sleep(10 * time.Millisecond * structs.SessionTTLMultiplier) retry.Run(t, func(r *retry.R) {
if s1.sessionTimers.Get("foo") != nil { if s1.sessionTimers.Get("foo") != nil {
t.Fatalf("timer should be gone") r.Fatal("timer should be gone")
} }
})
} }
func TestResetSessionTimerLocked_Renew(t *testing.T) { func TestResetSessionTimerLocked_Renew(t *testing.T) {