From 2a4eb9c132982a34f41db1552c300d5a5a7e0111 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 22 May 2018 12:50:31 +0800 Subject: [PATCH] use the correct QUIC version in the Chrome integration tests Because the version variable was set in the loop, we would always start a QUIC server with the lowest support QUIC version. --- integrationtests/chrome/chrome_suite_test.go | 5 ----- integrationtests/chrome/chrome_test.go | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integrationtests/chrome/chrome_suite_test.go b/integrationtests/chrome/chrome_suite_test.go index 526bb6b4f..d54edfd12 100644 --- a/integrationtests/chrome/chrome_suite_test.go +++ b/integrationtests/chrome/chrome_suite_test.go @@ -34,7 +34,6 @@ const ( var ( nFilesUploaded int32 // should be used atomically doneCalled utils.AtomicBool - version protocol.VersionNumber ) func TestChrome(t *testing.T) { @@ -83,10 +82,6 @@ func init() { }) } -var _ = JustBeforeEach(func() { - testserver.StartQuicServer([]protocol.VersionNumber{version}) -}) - var _ = AfterEach(func() { testserver.StopQuicServer() diff --git a/integrationtests/chrome/chrome_test.go b/integrationtests/chrome/chrome_test.go index 1465b61d1..ff7cf6406 100644 --- a/integrationtests/chrome/chrome_test.go +++ b/integrationtests/chrome/chrome_test.go @@ -3,6 +3,7 @@ package chrome_test import ( "fmt" + "github.com/lucas-clemente/quic-go/integrationtests/tools/testserver" "github.com/lucas-clemente/quic-go/internal/protocol" . "github.com/onsi/ginkgo" @@ -10,9 +11,13 @@ import ( var _ = Describe("Chrome tests", func() { for i := range protocol.SupportedVersions { - version = protocol.SupportedVersions[i] + version := protocol.SupportedVersions[i] Context(fmt.Sprintf("with version %s", version), func() { + JustBeforeEach(func() { + testserver.StartQuicServer([]protocol.VersionNumber{version}) + }) + It("downloads a small file", func() { chromeTest( version,