add an integration test downloading a large file with Chrome

ref #245
This commit is contained in:
Marten Seemann
2016-08-13 00:27:32 +07:00
parent 59c84971e4
commit 2fccb9d45d
2 changed files with 10 additions and 1 deletions

View File

@@ -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)
})
}
})

View File

@@ -25,7 +25,8 @@ import (
)
const (
dataLen = 500 * 1024
dataLen = 500 * 1024 // 500 KB
dataLongLen = 50 * 1024 * 1024 // 50 MB
)
var (