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

@ -26,7 +26,7 @@ var _ = Describe("Unidirectional Streams", func() {
BeforeEach(func() {
var err error
qconf = &quic.Config{Versions: []protocol.VersionNumber{protocol.VersionTLS}}
server, err = quic.ListenAddr("localhost:0", getTLSConfig(), getQuicConfigForServer(qconf))
server, err = quic.ListenAddr("localhost:0", getTLSConfig(), getQuicConfig(qconf))
Expect(err).ToNot(HaveOccurred())
serverAddr = fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port)
})
@ -81,7 +81,7 @@ var _ = Describe("Unidirectional Streams", func() {
client, err := quic.DialAddr(
serverAddr,
getTLSClientConfig(),
getQuicConfigForClient(qconf),
getQuicConfig(qconf),
)
Expect(err).ToNot(HaveOccurred())
runSendingPeer(client)
@ -99,7 +99,7 @@ var _ = Describe("Unidirectional Streams", func() {
client, err := quic.DialAddr(
serverAddr,
getTLSClientConfig(),
getQuicConfigForClient(qconf),
getQuicConfig(qconf),
)
Expect(err).ToNot(HaveOccurred())
runReceivingPeer(client)
@ -125,7 +125,7 @@ var _ = Describe("Unidirectional Streams", func() {
client, err := quic.DialAddr(
serverAddr,
getTLSClientConfig(),
getQuicConfigForClient(qconf),
getQuicConfig(qconf),
)
Expect(err).ToNot(HaveOccurred())
done2 := make(chan struct{})