diff --git a/integrationtests/self/handshake_test.go b/integrationtests/self/handshake_test.go index 5e1d9aeb6..cc5444c40 100644 --- a/integrationtests/self/handshake_test.go +++ b/integrationtests/self/handshake_test.go @@ -7,6 +7,7 @@ import ( "time" quic "github.com/lucas-clemente/quic-go" + "github.com/lucas-clemente/quic-go/integrationtests/tools/israce" "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/testdata" @@ -62,6 +63,10 @@ var _ = Describe("Handshake tests", func() { BeforeEach(func() { supportedVersions = protocol.SupportedVersions protocol.SupportedVersions = append(protocol.SupportedVersions, []protocol.VersionNumber{7, 8, 9, 10}...) + + if israce.Enabled { + Skip("This test modifies protocol.SupportedVersions, and can't be run with race detector.") + } }) AfterEach(func() { diff --git a/integrationtests/tools/israce/norace.go b/integrationtests/tools/israce/norace.go new file mode 100644 index 000000000..c32df8f12 --- /dev/null +++ b/integrationtests/tools/israce/norace.go @@ -0,0 +1,6 @@ +// +build !race + +package israce + +// Enabled reports if the race detector is enabled. +const Enabled = false diff --git a/integrationtests/tools/israce/race.go b/integrationtests/tools/israce/race.go new file mode 100644 index 000000000..dc2c02d2b --- /dev/null +++ b/integrationtests/tools/israce/race.go @@ -0,0 +1,6 @@ +// +build race + +package israce + +// Enabled reports if the race detector is enabled. +const Enabled = true