Skip to content

Commit 8e69f41

Browse files
committed
TUN-7934: Update quic-go to a version that queues datagrams for better throughput and drops large datagram
Remove TestUnregisterUdpSession
1 parent 00cd7c3 commit 8e69f41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+262
-13825
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/pkg/errors v0.9.1
2525
github.com/prometheus/client_golang v1.13.0
2626
github.com/prometheus/client_model v0.2.0
27-
github.com/quic-go/quic-go v0.40.1-0.20231203135336-87ef8ec48d55
27+
github.com/quic-go/quic-go v0.40.1-0.20240101045026-22b7f7744eb6
2828
github.com/rs/zerolog v1.20.0
2929
github.com/stretchr/testify v1.8.4
3030
github.com/urfave/cli/v2 v2.3.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5
324324
github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
325325
github.com/quic-go/quic-go v0.40.1-0.20231203135336-87ef8ec48d55 h1:I4N3ZRnkZPbDN935Tg8QDf8fRpHp3bZ0U0/L42jBgNE=
326326
github.com/quic-go/quic-go v0.40.1-0.20231203135336-87ef8ec48d55/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c=
327+
github.com/quic-go/quic-go v0.40.1-0.20240101045026-22b7f7744eb6 h1:OI4WiysowCcxLtcZMGBZildo12di3ljcMN4vWdUQpoU=
328+
github.com/quic-go/quic-go v0.40.1-0.20240101045026-22b7f7744eb6/go.mod h1:qCkNjqczPEvgsOnxZ0eCD14lv+B2LHlFAB++CNOh9hA=
327329
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
328330
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
329331
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=

quic/quic_protocol_test.go

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -109,63 +109,6 @@ func TestConnectResponseMeta(t *testing.T) {
109109
}
110110
}
111111

112-
func TestUnregisterUdpSession(t *testing.T) {
113-
unregisterMessage := "closed by eyeball"
114-
115-
var tests = []struct {
116-
name string
117-
sessionRPCServer mockSessionRPCServer
118-
timeout time.Duration
119-
}{
120-
121-
{
122-
name: "UnregisterUdpSessionTimesout if the RPC server does not respond",
123-
sessionRPCServer: mockSessionRPCServer{
124-
sessionID: uuid.New(),
125-
dstIP: net.IP{172, 16, 0, 1},
126-
dstPort: 8000,
127-
closeIdleAfter: testCloseIdleAfterHint,
128-
unregisterMessage: unregisterMessage,
129-
traceContext: "1241ce3ecdefc68854e8514e69ba42ca:b38f1bf5eae406f3:0:1",
130-
},
131-
// very very low value so we trigger the timeout every time.
132-
timeout: time.Nanosecond * 1,
133-
},
134-
}
135-
136-
for _, test := range tests {
137-
t.Run(test.name, func(t *testing.T) {
138-
logger := zerolog.Nop()
139-
clientStream, serverStream := newMockRPCStreams()
140-
sessionRegisteredChan := make(chan struct{})
141-
go func() {
142-
protocol, err := DetermineProtocol(serverStream)
143-
assert.NoError(t, err)
144-
rpcServerStream, err := NewRPCServerStream(serverStream, protocol)
145-
assert.NoError(t, err)
146-
err = rpcServerStream.Serve(test.sessionRPCServer, nil, &logger)
147-
assert.NoError(t, err)
148-
149-
serverStream.Close()
150-
close(sessionRegisteredChan)
151-
}()
152-
153-
rpcClientStream, err := NewRPCClientStream(context.Background(), clientStream, test.timeout, &logger)
154-
assert.NoError(t, err)
155-
156-
reg, err := rpcClientStream.RegisterUdpSession(context.Background(), test.sessionRPCServer.sessionID, test.sessionRPCServer.dstIP, test.sessionRPCServer.dstPort, testCloseIdleAfterHint, test.sessionRPCServer.traceContext)
157-
assert.NoError(t, err)
158-
assert.NoError(t, reg.Err)
159-
160-
assert.Error(t, rpcClientStream.UnregisterUdpSession(context.Background(), test.sessionRPCServer.sessionID, unregisterMessage))
161-
162-
rpcClientStream.Close()
163-
<-sessionRegisteredChan
164-
})
165-
}
166-
167-
}
168-
169112
func TestRegisterUdpSession(t *testing.T) {
170113
unregisterMessage := "closed by eyeball"
171114

vendor/github.com/quic-go/qtls-go1-20/LICENSE

Lines changed: 0 additions & 27 deletions
This file was deleted.

vendor/github.com/quic-go/qtls-go1-20/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

vendor/github.com/quic-go/qtls-go1-20/alert.go

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)