@@ -1431,12 +1431,12 @@ func TestStreamableGET(t *testing.T) {
14311431// TestStreamableHTTPHandler_OnSessionClose_SessionDeletion tests that the
14321432// OnSessionClose callback is called when the client closes the session.
14331433func TestStreamableHTTPHandler_OnSessionClose_SessionDeletion (t * testing.T ) {
1434- var closedConnections []string
1434+ var closedSessions []string
14351435
14361436 server := NewServer (testImpl , nil )
14371437 handler := NewStreamableHTTPHandler (func (req * http.Request ) * Server { return server }, & StreamableHTTPOptions {
14381438 OnSessionClose : func (sessionID string ) {
1439- closedConnections = append (closedConnections , sessionID )
1439+ closedSessions = append (closedSessions , sessionID )
14401440 },
14411441 })
14421442
@@ -1458,10 +1458,10 @@ func TestStreamableHTTPHandler_OnSessionClose_SessionDeletion(t *testing.T) {
14581458 t .Fatalf ("session.Close() failed: %v" , err )
14591459 }
14601460
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 ))
14631463 }
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 )
14661466 }
14671467}
0 commit comments