@@ -1431,12 +1431,12 @@ func TestStreamableGET(t *testing.T) {
1431
1431
// TestStreamableHTTPHandler_OnSessionClose_SessionDeletion tests that the
1432
1432
// OnSessionClose callback is called when the client closes the session.
1433
1433
func TestStreamableHTTPHandler_OnSessionClose_SessionDeletion (t * testing.T ) {
1434
- var closedConnections []string
1434
+ var closedSessions []string
1435
1435
1436
1436
server := NewServer (testImpl , nil )
1437
1437
handler := NewStreamableHTTPHandler (func (req * http.Request ) * Server { return server }, & StreamableHTTPOptions {
1438
1438
OnSessionClose : func (sessionID string ) {
1439
- closedConnections = append (closedConnections , sessionID )
1439
+ closedSessions = append (closedSessions , sessionID )
1440
1440
},
1441
1441
})
1442
1442
@@ -1458,10 +1458,10 @@ func TestStreamableHTTPHandler_OnSessionClose_SessionDeletion(t *testing.T) {
1458
1458
t .Fatalf ("session.Close() failed: %v" , err )
1459
1459
}
1460
1460
1461
- if len (closedConnections ) != 1 {
1462
- t .Fatalf ("got %d connections , want 1" , len (closedConnections ))
1461
+ if len (closedSessions ) != 1 {
1462
+ t .Fatalf ("got %d closed sessions , want 1" , len (closedSessions ))
1463
1463
}
1464
- if closedConnections [0 ] != sessionID {
1465
- t .Fatalf ("got session ID %q, want %q" , closedConnections [0 ], sessionID )
1464
+ if closedSessions [0 ] != sessionID {
1465
+ t .Fatalf ("got session ID %q, want %q" , closedSessions [0 ], sessionID )
1466
1466
}
1467
1467
}
0 commit comments