Skip to content

Commit

Permalink
fix logging of connection IDs in tracer test (#4118)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Oct 23, 2023
1 parent 36f7fe7 commit 5314d90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integrationtests/self/tracer_test.go
Expand Up @@ -19,7 +19,7 @@ import (
. "github.com/onsi/gomega"
)

var _ = Describe("Handshake tests", func() {
var _ = Describe("Tracer tests", func() {
addTracers := func(pers protocol.Perspective, conf *quic.Config) *quic.Config {
enableQlog := mrand.Int()%3 != 0
enableCustomTracer := mrand.Int()%3 != 0
Expand All @@ -30,10 +30,10 @@ var _ = Describe("Handshake tests", func() {
if enableQlog {
tracerConstructors = append(tracerConstructors, func(_ context.Context, p logging.Perspective, connID quic.ConnectionID) *logging.ConnectionTracer {
if mrand.Int()%2 == 0 { // simulate that a qlog collector might only want to log some connections
fmt.Fprintf(GinkgoWriter, "%s qlog tracer deciding to not trace connection %x\n", p, connID)
fmt.Fprintf(GinkgoWriter, "%s qlog tracer deciding to not trace connection %s\n", p, connID)
return nil
}
fmt.Fprintf(GinkgoWriter, "%s qlog tracing connection %x\n", p, connID)
fmt.Fprintf(GinkgoWriter, "%s qlog tracing connection %s\n", p, connID)
return qlog.NewConnectionTracer(utils.NewBufferedWriteCloser(bufio.NewWriter(&bytes.Buffer{}), io.NopCloser(nil)), p, connID)
})
}
Expand Down

0 comments on commit 5314d90

Please sign in to comment.