forked from quic-go/quic-go
only print the warning about the UDP receive buffer size once
This commit is contained in:
@@ -4,7 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
mocklogging "github.com/lucas-clemente/quic-go/internal/mocks/logging"
|
||||
@@ -63,6 +66,7 @@ var _ = Describe("Packet Handler Map", func() {
|
||||
})
|
||||
|
||||
JustBeforeEach(func() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
conn = NewMockPacketConn(mockCtrl)
|
||||
conn.EXPECT().LocalAddr().Return(&net.UDPAddr{}).AnyTimes()
|
||||
conn.EXPECT().ReadFrom(gomock.Any()).DoAndReturn(func(b []byte) (int, net.Addr, error) {
|
||||
@@ -77,6 +81,8 @@ var _ = Describe("Packet Handler Map", func() {
|
||||
handler = phm.(*packetHandlerMap)
|
||||
})
|
||||
|
||||
AfterEach(func() { log.SetOutput(os.Stdout) })
|
||||
|
||||
It("closes", func() {
|
||||
getMultiplexer() // make the sync.Once execute
|
||||
// replace the clientMuxer. getClientMultiplexer will now return the MockMultiplexer
|
||||
|
||||
Reference in New Issue
Block a user