add a flag to turn off PRR

This commit is contained in:
Marten Seemann
2019-05-21 10:57:55 +01:00
parent 8afed81c49
commit fd33eb319f
2 changed files with 24 additions and 5 deletions

View File

@@ -553,6 +553,20 @@ var _ = Describe("Cubic Sender", func() {
Expect(sender.GetCongestionWindow()).To(Equal(expectedSendWindow))
})
It("no PRR", func() {
sender.SetNumEmulatedConnections(1)
sender.noPRR = true
SendAvailableSendWindow()
LoseNPackets(9)
AckNPackets(1)
Expect(sender.GetCongestionWindow()).To(Equal(protocol.ByteCount(renoBeta * float32(defaultWindowTCP))))
windowInPackets := renoBeta * float32(defaultWindowTCP) / float32(protocol.DefaultTCPMSS)
numSent := SendAvailableSendWindow()
Expect(numSent).To(BeEquivalentTo(windowInPackets))
})
It("reset after connection migration", func() {
Expect(sender.GetCongestionWindow()).To(Equal(defaultWindowTCP))
Expect(sender.SlowstartThreshold()).To(Equal(MaxCongestionWindow))