From 4a2a5740b2bb2090867efb61eab1b79bb508aafc Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 19 Apr 2023 17:26:55 +0200 Subject: [PATCH] use larger range to draw greased value for post-quantum test from (#3780) --- integrationtests/self/handshake_drop_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integrationtests/self/handshake_drop_test.go b/integrationtests/self/handshake_drop_test.go index 574df4b6c..2e3a278d5 100644 --- a/integrationtests/self/handshake_drop_test.go +++ b/integrationtests/self/handshake_drop_test.go @@ -11,6 +11,8 @@ import ( "sync/atomic" "time" + "github.com/quic-go/quic-go/quicvarint" + "github.com/quic-go/quic-go" quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" "github.com/quic-go/quic-go/internal/protocol" @@ -283,7 +285,8 @@ var _ = Describe("Handshake drop tests", func() { b := make([]byte, 2500) // the ClientHello will now span across 3 packets mrand.New(mrand.NewSource(GinkgoRandomSeed())).Read(b) wire.AdditionalTransportParametersClient = map[uint64][]byte{ - uint64(27 + 31*mrand.Intn(100)): b, + // Avoid random collisions with the greased transport parameters. + uint64(27+31*(1000+mrand.Int63()/31)) % quicvarint.Max: b, } startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {