From 2fccb9d45d9bb299293e9ce661a5de7032b691fc Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 13 Aug 2016 00:27:32 +0700 Subject: [PATCH] add an integration test downloading a large file with Chrome ref #245 --- integrationtests/chrome_test.go | 8 ++++++++ integrationtests/integrationtests_suite_test.go | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/integrationtests/chrome_test.go b/integrationtests/chrome_test.go index dce83196b..2280d7703 100644 --- a/integrationtests/chrome_test.go +++ b/integrationtests/chrome_test.go @@ -125,6 +125,14 @@ var _ = Describe("Chrome tests", func() { Eventually(func() int { return getDownloadSize("data") }, 30, 0.1).Should(Equal(dataLen)) Expect(getDownloadMD5("data")).To(Equal(dataMan.GetMD5())) }, 60) + + It("downloads a large file", func() { + dataMan.GenerateData(dataLongLen) + err := wd.Get("https://quic.clemente.io/data") + Expect(err).NotTo(HaveOccurred()) + Eventually(func() int { return getDownloadSize("data") }, 90, 0.5).Should(Equal(dataLongLen)) + Expect(getDownloadMD5("data")).To(Equal(dataMan.GetMD5())) + }, 100) }) } }) diff --git a/integrationtests/integrationtests_suite_test.go b/integrationtests/integrationtests_suite_test.go index ba994b6fc..ca9829e2b 100644 --- a/integrationtests/integrationtests_suite_test.go +++ b/integrationtests/integrationtests_suite_test.go @@ -25,7 +25,8 @@ import ( ) const ( - dataLen = 500 * 1024 + dataLen = 500 * 1024 // 500 KB + dataLongLen = 50 * 1024 * 1024 // 50 MB ) var (