simplify the Tracer interface by combining the TracerFor... methods

This commit is contained in:
Marten Seemann 2020-07-11 10:46:35 +07:00
parent ece3592544
commit ee24d3899e
32 changed files with 139 additions and 194 deletions

View file

@ -46,7 +46,7 @@ var _ = Describe("Multiplexing", func() {
addr,
fmt.Sprintf("localhost:%d", addr.(*net.UDPAddr).Port),
getTLSClientConfig(),
getQuicConfigForClient(&quic.Config{Versions: []protocol.VersionNumber{version}}),
getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{version}}),
)
Expect(err).ToNot(HaveOccurred())
defer sess.CloseWithError(0, "")
@ -62,7 +62,7 @@ var _ = Describe("Multiplexing", func() {
ln, err := quic.ListenAddr(
"localhost:0",
getTLSConfig(),
getQuicConfigForServer(&quic.Config{Versions: []protocol.VersionNumber{version}}),
getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{version}}),
)
Expect(err).ToNot(HaveOccurred())
return ln
@ -145,7 +145,7 @@ var _ = Describe("Multiplexing", func() {
server, err := quic.Listen(
conn,
getTLSConfig(),
getQuicConfigForServer(&quic.Config{Versions: []protocol.VersionNumber{version}}),
getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{version}}),
)
Expect(err).ToNot(HaveOccurred())
runServer(server)
@ -181,7 +181,7 @@ var _ = Describe("Multiplexing", func() {
server1, err := quic.Listen(
conn1,
getTLSConfig(),
getQuicConfigForServer(&quic.Config{Versions: []protocol.VersionNumber{version}}),
getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{version}}),
)
Expect(err).ToNot(HaveOccurred())
runServer(server1)
@ -190,7 +190,7 @@ var _ = Describe("Multiplexing", func() {
server2, err := quic.Listen(
conn2,
getTLSConfig(),
getQuicConfigForServer(&quic.Config{Versions: []protocol.VersionNumber{version}}),
getQuicConfig(&quic.Config{Versions: []protocol.VersionNumber{version}}),
)
Expect(err).ToNot(HaveOccurred())
runServer(server2)