Update session_test.go

This commit is contained in:
风扇滑翔翼 2025-07-08 22:18:41 +08:00 committed by GitHub
parent f14c548451
commit 67f5e24453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ import (
func TestSessionManagerAdd(t *testing.T) {
m := NewSessionManager()
s := m.Allocate(0)
s := m.Allocate(ClientStrategy{})
if s.ID != 1 {
t.Error("id: ", s.ID)
}
@ -17,7 +17,7 @@ func TestSessionManagerAdd(t *testing.T) {
t.Error("size: ", m.Size())
}
s = m.Allocate(0)
s = m.Allocate(ClientStrategy{})
if s.ID != 2 {
t.Error("id: ", s.ID)
}
@ -39,7 +39,7 @@ func TestSessionManagerAdd(t *testing.T) {
func TestSessionManagerClose(t *testing.T) {
m := NewSessionManager()
s := m.Allocate(0)
s := m.Allocate(ClientStrategy{})
if m.CloseIfNoSession() {
t.Error("able to close")