fix flaky flow controller test

This commit is contained in:
Marten Seemann
2017-12-22 13:08:31 +07:00
parent a6eca911de
commit 20816bb866
3 changed files with 7 additions and 7 deletions

View File

@@ -184,7 +184,7 @@ var _ = Describe("Stream Flow controller", func() {
It("tells the connection flow controller when the window was autotuned", func() {
oldOffset := controller.bytesRead
controller.contributesToConnection = true
setRtt(20 * time.Millisecond)
setRtt(200 * time.Millisecond)
controller.epochStartOffset = oldOffset
controller.epochStartTime = time.Now().Add(-time.Millisecond)
controller.AddBytesRead(55)
@@ -197,7 +197,7 @@ var _ = Describe("Stream Flow controller", func() {
It("doesn't tell the connection flow controller if it doesn't contribute", func() {
oldOffset := controller.bytesRead
controller.contributesToConnection = false
setRtt(20 * time.Millisecond)
setRtt(200 * time.Millisecond)
controller.epochStartOffset = oldOffset
controller.epochStartTime = time.Now().Add(-time.Millisecond)
controller.AddBytesRead(55)