Took out usage of snapshot SessionListTTL

This commit is contained in:
Atin Malaviya 2014-12-10 21:37:06 -05:00
parent 0f9723e6f8
commit 60915629f6
2 changed files with 8 additions and 10 deletions

View File

@ -239,7 +239,7 @@ func TestSessionTTL(t *testing.T) {
t.Fatalf("Incorrect TTL: %s", respObj[0].TTL)
}
time.Sleep(ttl * structs.SessionTTLMultiplier + ttl)
time.Sleep(ttl*structs.SessionTTLMultiplier + ttl)
req, err = http.NewRequest("GET",
"/v1/session/info/"+id, nil)

View File

@ -798,16 +798,14 @@ func TestStoreSnapshot(t *testing.T) {
t.Fatalf("missing sessions")
}
// Check there is 1 session with TTL
sessions, err = snap.SessionListTTL()
if err != nil {
t.Fatalf("err: %v", err)
ttls := 0
for _, session := range sessions {
if session.TTL != "" {
ttls++
}
}
if len(sessions) < 1 {
t.Fatalf("missing TTL session")
} else if len(sessions) > 1 {
t.Fatalf("too many TTL sessions")
if ttls != 1 {
t.Fatalf("Wrong number of sessions with TTL")
}
// Check for an acl