Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(910)

Unified Diff: net/quic/quic_connection_test.cc

Issue 182063002: Add a time based loss detection algorithm to QUIC that loses packets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_connection_stats.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 72244bfab5a0b953f1e99ddcc52f976f95787baf..39a626ac4d100ed51e8972a9fffe6021985cebc4 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -580,7 +580,7 @@ class QuicConnectionTest : public ::testing::TestWithParam<QuicVersion> {
EXPECT_CALL(*loss_algorithm_, GetLossTimeout())
.WillRepeatedly(Return(QuicTime::Zero()));
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillRepeatedly(Return(SequenceNumberSet()));
}
@@ -1060,7 +1060,7 @@ TEST_P(QuicConnectionTest, TruncatedAck) {
lost_packets.insert(i * 2);
}
}
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(entropy_calculator_,
EntropyHash(511)).WillOnce(testing::Return(0));
@@ -1080,7 +1080,7 @@ TEST_P(QuicConnectionTest, TruncatedAck) {
// Removing one missing packet allows us to ack 192 and one more range, but
// 192 has already been declared lost, so it doesn't register as an ack.
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(SequenceNumberSet()));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _)).Times(1);
@@ -1144,7 +1144,7 @@ TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) {
// First nack triggers early retransmit.
SequenceNumberSet lost_packets;
lost_packets.insert(1);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketLost(1, _)).Times(1);
@@ -1161,7 +1161,7 @@ TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) {
NackPacket(original, &frame2);
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _));
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(SequenceNumberSet()));
ProcessAckPacket(&frame2);
@@ -1177,7 +1177,7 @@ TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) {
writer_->Reset();
// No more packet loss for the rest of the test.
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillRepeatedly(Return(SequenceNumberSet()));
ProcessAckPacket(&frame2);
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, NOT_RETRANSMISSION,
@@ -1557,7 +1557,7 @@ TEST_P(QuicConnectionTest, AbandonAllFEC) {
// Lose the first FEC packet and ack the three data packets.
SequenceNumberSet lost_packets;
lost_packets.insert(2);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _)).Times(3);
@@ -1844,7 +1844,7 @@ TEST_P(QuicConnectionTest, RetransmitOnNack) {
NackPacket(2, &nack_two);
SequenceNumberSet lost_packets;
lost_packets.insert(2);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(3, _));
@@ -1872,7 +1872,7 @@ TEST_P(QuicConnectionTest, DiscardRetransmit) {
BlockOnNextWrite();
SequenceNumberSet lost_packets;
lost_packets.insert(2);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _)).Times(2);
@@ -1882,7 +1882,7 @@ TEST_P(QuicConnectionTest, DiscardRetransmit) {
EXPECT_EQ(1u, connection_.NumQueuedPackets());
// Now, ack the previous transmission.
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(SequenceNumberSet()));
QuicAckFrame ack_all = InitAckFrame(3, 0);
ProcessAckPacket(&ack_all);
@@ -1913,7 +1913,7 @@ TEST_P(QuicConnectionTest, RetransmitNackedLargestObserved) {
// The first nack should retransmit the largest observed packet.
SequenceNumberSet lost_packets;
lost_packets.insert(1);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketLost(1, _)).Times(1);
@@ -2037,7 +2037,7 @@ TEST_P(QuicConnectionTest, NoLimitPacketsPerNack) {
// 14 packets have been NACK'd and lost. In TCP cubic, PRR limits
// the retransmission rate in the case of burst losses.
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(15, _)).Times(1);
@@ -2401,7 +2401,7 @@ TEST_P(QuicConnectionTest, RetransmissionCountCalculation) {
// Once by explicit nack.
SequenceNumberSet lost_packets;
lost_packets.insert(rto_sequence_number);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_)).Times(1);
EXPECT_CALL(*send_algorithm_, OnPacketLost(rto_sequence_number, _)).Times(1);
@@ -2918,7 +2918,7 @@ TEST_P(QuicConnectionTest, BundleAckWithDataOnIncomingAck) {
NackPacket(1, &ack);
SequenceNumberSet lost_packets;
lost_packets.insert(1);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(2, _)).Times(1);
@@ -2933,7 +2933,7 @@ TEST_P(QuicConnectionTest, BundleAckWithDataOnIncomingAck) {
// and see if there is more data to send.
ack = InitAckFrame(3, 0);
NackPacket(1, &ack);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(SequenceNumberSet()));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(3, _)).Times(1);
@@ -2947,7 +2947,7 @@ TEST_P(QuicConnectionTest, BundleAckWithDataOnIncomingAck) {
// Send the same ack, but send both data and an ack together.
ack = InitAckFrame(3, 0);
NackPacket(1, &ack);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(SequenceNumberSet()));
EXPECT_CALL(visitor_, OnCanWrite()).WillOnce(
IgnoreResult(InvokeWithoutArgs(
@@ -3406,7 +3406,7 @@ TEST_P(QuicConnectionTest, CheckSendStats) {
SequenceNumberSet lost_packets;
lost_packets.insert(1);
lost_packets.insert(3);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(4, _)).Times(1);
@@ -3640,7 +3640,7 @@ TEST_P(QuicConnectionTest, AckNotifierFailToTriggerCallback) {
NackPacket(1, &frame);
SequenceNumberSet lost_packets;
lost_packets.insert(1);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, OnPacketLost(1, _));
EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(1, _));
@@ -3665,7 +3665,7 @@ TEST_P(QuicConnectionTest, AckNotifierCallbackAfterRetransmission) {
NackPacket(2, &frame);
SequenceNumberSet lost_packets;
lost_packets.insert(2);
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillOnce(Return(lost_packets));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(_, _)).Times(3);
@@ -3676,7 +3676,7 @@ TEST_P(QuicConnectionTest, AckNotifierCallbackAfterRetransmission) {
// Now we get an ACK for packet 5 (retransmitted packet 2), which should
// trigger the callback.
- EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _))
+ EXPECT_CALL(*loss_algorithm_, DetectLostPackets(_, _, _, _, _))
.WillRepeatedly(Return(SequenceNumberSet()));
EXPECT_CALL(*send_algorithm_, UpdateRtt(_));
EXPECT_CALL(*send_algorithm_, OnPacketAcked(5, _));
« no previous file with comments | « net/quic/quic_connection_stats.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698