From e84b26fcf5deff7056ba42a0d26ac6fb0b2b9dc6 Mon Sep 17 00:00:00 2001 From: Atin Malaviya Date: Wed, 10 Dec 2014 21:04:09 -0500 Subject: [PATCH] Remove hardcoded wait time in session TTL tests --- command/agent/session_endpoint_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/agent/session_endpoint_test.go b/command/agent/session_endpoint_test.go index 9d2befb02..86bb7243b 100644 --- a/command/agent/session_endpoint_test.go +++ b/command/agent/session_endpoint_test.go @@ -239,8 +239,7 @@ func TestSessionTTL(t *testing.T) { t.Fatalf("Incorrect TTL: %s", respObj[0].TTL) } - // now wait for timeout, it is really 2*TTL, so wait 3*TTL - time.Sleep(ttl * 3) + time.Sleep(ttl * structs.SessionTTLMultiplier + ttl) req, err = http.NewRequest("GET", "/v1/session/info/"+id, nil)