Skip to content

Commit

Permalink
Silence TestClientDeadlineHandling server logs (#651)
Browse files Browse the repository at this point in the history
Test case emits extremely noisy logs from TLS handshake errors due to
closing many connection. This change discards HTTP server logs for
this case.
  • Loading branch information
emcfarlane authored Dec 12, 2023
1 parent 52abcce commit a990aad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client_ext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"errors"
"fmt"
"io"
"log"
"net/http"
"net/http/httptest"
"runtime"
Expand Down Expand Up @@ -448,6 +449,7 @@ func TestClientDeadlineHandling(t *testing.T) {
}
handler.ServeHTTP(respWriter, req)
}))
svr.Config.ErrorLog = log.New(io.Discard, "", 0) //nolint:forbidigo
svr.EnableHTTP2 = true
svr.StartTLS()
t.Cleanup(svr.Close)
Expand Down

0 comments on commit a990aad

Please sign in to comment.