File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ func TestSessionTotalMetric(t *testing.T) {
9696 },
9797 })
9898 require .NoError (t , err )
99- defer store .Close ()
99+ defer func () { _ = store .Close () } ()
100100
101101 h := & HTTPServer {
102102 options : & Options {
@@ -110,7 +110,7 @@ func TestSessionTotalMetric(t *testing.T) {
110110 require .NoError (t , err )
111111 pubBytes , err := x509 .MarshalPKIXPublicKey (& priv .PublicKey )
112112 require .NoError (t , err )
113- pubPem := pem .EncodeToMemory (& pem.Block {Type : "RSA PUBLIC KEY" , Bytes : pubBytes })
113+ pubPem := pem .EncodeToMemory (& pem.Block {Type : "PUBLIC KEY" , Bytes : pubBytes })
114114 pubB64 := base64 .StdEncoding .EncodeToString (pubPem )
115115
116116 correlationID := xid .New ().String ()
Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ func TestOnRemovalSessionTracking(t *testing.T) {
469469 OnRemoval : onRemoval ,
470470 })
471471 require .NoError (t , err )
472- defer db .Close ()
472+ defer func () { _ = db .Close () } ()
473473
474474 waitRemoval := func (msg string ) {
475475 t .Helper ()
@@ -507,6 +507,7 @@ func TestOnRemovalSessionTracking(t *testing.T) {
507507
508508 // Periodically access the cache to trigger lazy eviction.
509509 stop := make (chan struct {})
510+ defer close (stop )
510511 go func () {
511512 ticker := time .NewTicker (10 * time .Millisecond )
512513 defer ticker .Stop ()
@@ -520,5 +521,4 @@ func TestOnRemovalSessionTracking(t *testing.T) {
520521 }
521522 }()
522523 waitRemoval ("TTL eviction" )
523- close (stop )
524524}
You can’t perform that action at this time.
0 commit comments