mirror of
https://github.com/status-im/consul.git
synced 2025-02-19 17:14:37 +00:00
Add invalidateSession test
This commit is contained in:
parent
ac54010027
commit
31e461e10b
@ -148,12 +148,8 @@ func TestServer_sessionTTL(t *testing.T) {
|
|||||||
t.Fatalf("sessionTimes length should be 2")
|
t.Fatalf("sessionTimes length should be 2")
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy the id1 session (test clearSessionTimer)
|
// destroy the via invalidateSession as if on TTL expiry
|
||||||
arg.Op = structs.SessionDestroy
|
leader.invalidateSession(id2)
|
||||||
arg.Session.ID = id1
|
|
||||||
if err := client.Call("Session.Apply", &arg, &id1); err != nil {
|
|
||||||
t.Fatalf("err: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(leader.sessionTimers) != 1 {
|
if len(leader.sessionTimers) != 1 {
|
||||||
t.Fatalf("sessionTimers length should 1")
|
t.Fatalf("sessionTimers length should 1")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user