make it possible to use a custom tracer and the default tracer in tests

This commit is contained in:
Marten Seemann 2021-02-15 13:58:59 +08:00
parent b94a4440cc
commit 7ee88def4a
2 changed files with 6 additions and 2 deletions

View file

@ -85,7 +85,7 @@ var _ = Describe("Key Update tests", func() {
sess, err := quic.DialAddr(
fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port),
getTLSClientConfig(),
&quic.Config{Tracer: newTracer(func() logging.ConnectionTracer { return &keyUpdateConnTracer{} })},
getQuicConfig(&quic.Config{Tracer: newTracer(func() logging.ConnectionTracer { return &keyUpdateConnTracer{} })}),
)
Expect(err).ToNot(HaveOccurred())
str, err := sess.AcceptUniStream(context.Background())