diff options
| author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-17 15:51:33 +0000 |
|---|---|---|
| committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-17 15:51:33 +0000 |
| commit | ce7bb141d5359dfe1224a85bafa802a09f1e683d (patch) | |
| tree | d2f27658cb8e127a89d7b4198fe04949283e30e7 /net/quic/quic_connection_test.cc | |
| parent | f5d0fa6e33af3ac62a6d98e4cac1b1420533f6d7 (diff) | |
| download | chromium_src-ce7bb141d5359dfe1224a85bafa802a09f1e683d.zip chromium_src-ce7bb141d5359dfe1224a85bafa802a09f1e683d.tar.gz chromium_src-ce7bb141d5359dfe1224a85bafa802a09f1e683d.tar.bz2 | |
Land Recent QUIC Changes.
Stub for BBRv2, based on TCP congestion feedback frames.
Merge internal change: 67154078
https://codereview.chromium.org/283333008/
Update QuicSentPacketManager to sample a new recent min rtt within the
first 2 rtt samples after quiescence.
Merge internal change: 67149500
https://codereview.chromium.org/286143007/
Change the test QUIC stream id to be the first non reserved stream ID
(and also to use the right typedef).
Merge internal change: 67146383
https://codereview.chromium.org/292453003/
Adds dynamic FEC on/off switch in packet creator. Tightens use of
max_packets_per_fec_group through use of a setter method across the QUIC
code. FEC operations are now decided based on should_fec_protect_, which
is expected to be a dynamic on/off control in the packet creator,
instead of max_packets_per_fec_group.
Adds dynamic FEC on/off switch in packet_creator.
Merge internal change: 67144415
https://codereview.chromium.org/286153003/
Minor cleanup to simplify QuicSentPacketManager's OnPacketSent and
always reset the retransmission alarm anytime a new pending packet is
sent.
Always setting the retransmission alarm is only a simplification of the
approach, and not intended to fix any issues.
Merge internal change: 67143274
https://codereview.chromium.org/288333002/
Don't set QUIC's write alarm if we are connection flow control blocked.
Added QUIC_VERSION_19 to kSupportedQuicVersions.
Merge internal change: 67141668
https://codereview.chromium.org/285193006/
Minor cleanup of QuicUnackedPacketMap to simplify the implementation of
HasPendingPackets and move a test only method,
GetNumRetransmittablePackets, into QuicSentPacketManagerPeer.
Merge internal change: 67123054
https://codereview.chromium.org/282323003/
Fix a QUIC bug where a crypto packet was never removed from the
UnackedPacketMap if it was not acked and spuriously retransmitted at
least twice.
Merge internal change: 67050631
https://codereview.chromium.org/284273002/
Refactor: move flow controller from QuicConnection to QuicSession.
No behavior change intended.
Merge internal change: 67036889
https://codereview.chromium.org/286213002/
Fix a QUIC bug where a packet could remain in the UnackedPacketMap
indefinitely. This can cause a memory leak when tracking entropy.
Merge internal change: 67028206
https://codereview.chromium.org/285233006/
Delete dead code used only in tests.
Merge internal change: 66938996
https://codereview.chromium.org/288303002/
Add handling + parsing for ALTSVC frame. Also change frame type number
and add an extra version check for BLOCKED frame. SPDY4/HTTP2 only.
Merge internal change: 66925490
https://codereview.chromium.org/286173002/
QUIC loadtest fixes:
- Wait for the QUIC handshake to complete before saying that the
QuicTestClient is connected.
- Force connect at client creation time when talking HTTP/HTTPS/SPDY
for consistency.
Merge internal change: 66855236
https://codereview.chromium.org/282153004/
QUIC now respects configured SPDY stream limits.
Merge internal change: 66831620
https://codereview.chromium.org/286113004/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/288313003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_connection_test.cc')
| -rw-r--r-- | net/quic/quic_connection_test.cc | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc index 6ca7c30..48cb2db 100644 --- a/net/quic/quic_connection_test.cc +++ b/net/quic/quic_connection_test.cc @@ -419,11 +419,9 @@ class TestConnection : public QuicConnection { TestConnectionHelper* helper, TestPacketWriter* writer, bool is_server, - QuicVersion version, - uint32 flow_control_send_window) + QuicVersion version) : QuicConnection(connection_id, address, helper, writer, is_server, - SupportedVersions(version), - flow_control_send_window), + SupportedVersions(version)), writer_(writer) { // Disable tail loss probes for most tests. QuicSentPacketManagerPeer::SetMaxTailLossProbes( @@ -588,8 +586,7 @@ class QuicConnectionTest : public ::testing::TestWithParam<QuicVersion> { helper_(new TestConnectionHelper(&clock_, &random_generator_)), writer_(new TestPacketWriter(version())), connection_(connection_id_, IPEndPoint(), helper_.get(), - writer_.get(), false, version(), - kDefaultFlowControlSendWindow), + writer_.get(), false, version()), frame1_(1, false, 0, MakeIOVector(data1)), frame2_(1, false, 3, MakeIOVector(data2)), sequence_number_length_(PACKET_6BYTE_SEQUENCE_NUMBER), @@ -613,7 +610,7 @@ class QuicConnectionTest : public ::testing::TestWithParam<QuicVersion> { Return(kMaxPacketSize)); ON_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) .WillByDefault(Return(true)); - EXPECT_CALL(visitor_, HasPendingWrites()).Times(AnyNumber()); + EXPECT_CALL(visitor_, WillingAndAbleToWrite()).Times(AnyNumber()); EXPECT_CALL(visitor_, HasPendingHandshake()).Times(AnyNumber()); EXPECT_CALL(visitor_, OnCanWrite()).Times(AnyNumber()); EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false)); @@ -1444,7 +1441,8 @@ TEST_P(QuicConnectionTest, FECSending) { connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, IN_FEC_GROUP, &payload_length); // And send FEC every two packets. - connection_.options()->max_packets_per_fec_group = 2; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 2)); // Send 4 data packets and 2 FEC packets. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6); @@ -1463,7 +1461,8 @@ TEST_P(QuicConnectionTest, FECQueueing) { connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, IN_FEC_GROUP, &payload_length); // And send FEC every two packets. - connection_.options()->max_packets_per_fec_group = 2; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 2)); EXPECT_EQ(0u, connection_.NumQueuedPackets()); BlockOnNextWrite(); @@ -1475,7 +1474,9 @@ TEST_P(QuicConnectionTest, FECQueueing) { } TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) { - connection_.options()->max_packets_per_fec_group = 1; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 1)); + // 1 Data and 1 FEC packet. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2); connection_.SendStreamDataWithString(3, "foo", 0, !kFin, NULL); @@ -1493,7 +1494,8 @@ TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) { TEST_P(QuicConnectionTest, DontAbandonAckedFEC) { EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); - connection_.options()->max_packets_per_fec_group = 1; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 1)); // 1 Data and 1 FEC packet. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6); @@ -1520,7 +1522,8 @@ TEST_P(QuicConnectionTest, DontAbandonAckedFEC) { TEST_P(QuicConnectionTest, AbandonAllFEC) { EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); - connection_.options()->max_packets_per_fec_group = 1; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 1)); // 1 Data and 1 FEC packet. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6); @@ -1645,7 +1648,9 @@ TEST_P(QuicConnectionTest, FramePackingFEC) { return; } // Enable fec. - connection_.options()->max_packets_per_fec_group = 6; + EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn( + QuicConnectionPeer::GetPacketCreator(&connection_), 6)); + // Block the connection. connection_.GetSendAlarm()->Set( clock_.ApproximateNow().Add(QuicTime::Delta::FromSeconds(1))); @@ -1778,7 +1783,7 @@ TEST_P(QuicConnectionTest, OnCanWrite) { &TestConnection::SendStreamData3)), IgnoreResult(InvokeWithoutArgs(&connection_, &TestConnection::SendStreamData5)))); - EXPECT_CALL(visitor_, HasPendingWrites()).WillOnce(Return(true)); + EXPECT_CALL(visitor_, WillingAndAbleToWrite()).WillOnce(Return(true)); EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)).WillRepeatedly( testing::Return(QuicTime::Delta::Zero())); @@ -3948,11 +3953,9 @@ TEST_P(QuicConnectionTest, Pacing) { ValueRestore<bool> old_flag(&FLAGS_enable_quic_pacing, true); TestConnection server(connection_id_, IPEndPoint(), helper_.get(), - writer_.get(), true, version(), - kDefaultFlowControlSendWindow); + writer_.get(), true, version()); TestConnection client(connection_id_, IPEndPoint(), helper_.get(), - writer_.get(), false, version(), - kDefaultFlowControlSendWindow); + writer_.get(), false, version()); EXPECT_TRUE(client.sent_packet_manager().using_pacing()); EXPECT_FALSE(server.sent_packet_manager().using_pacing()); } @@ -3980,17 +3983,6 @@ TEST_P(QuicConnectionTest, ControlFramesInstigateAcks) { EXPECT_TRUE(ack_alarm->IsSet()); } -TEST_P(QuicConnectionTest, InvalidFlowControlWindow) { - ValueRestore<bool> old_flag(&FLAGS_enable_quic_pacing, true); - - const uint32 kSmallerFlowControlWindow = kDefaultFlowControlSendWindow - 1; - TestConnection connection(connection_id_, IPEndPoint(), helper_.get(), - writer_.get(), true, version(), - kSmallerFlowControlWindow); - EXPECT_EQ(kDefaultFlowControlSendWindow, - connection.max_flow_control_receive_window_bytes()); -} - } // namespace } // namespace test } // namespace net |
