Merge pull request #1784 from lucas-clemente/disable-vn-test-race-detector

don't run the version negotiation tests with race detector
This commit is contained in:
Marten Seemann
2019-02-11 17:10:59 +08:00
committed by GitHub
3 changed files with 17 additions and 0 deletions

View File

@@ -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() {

View File

@@ -0,0 +1,6 @@
// +build !race
package israce
// Enabled reports if the race detector is enabled.
const Enabled = false

View File

@@ -0,0 +1,6 @@
// +build race
package israce
// Enabled reports if the race detector is enabled.
const Enabled = true