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

Unified Diff: net/quic/quic_connection_test.cc

Issue 471313002: Add an Update method on QuicAlarm which contains a granularity. Also (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0814_2
Patch Set: Created 6 years, 4 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
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 13f97bf436c9a65226141596283009b101f8fe5b..f798b37fd2a27ccf523320795c68ad8bd72f5923 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -2639,7 +2639,10 @@ TEST_P(QuicConnectionTest, PingAfterSend) {
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
ProcessAckPacket(&frame);
EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
- EXPECT_EQ(clock_.ApproximateNow().Add(QuicTime::Delta::FromSeconds(15)),
+ // The ping timer is set slightly less than 15 seconds in the future, because
+ // of the 1s ping timer alarm granularity.
+ EXPECT_EQ(clock_.ApproximateNow().Add(QuicTime::Delta::FromSeconds(15))
+ .Subtract(QuicTime::Delta::FromMilliseconds(5)),
connection_.GetPingAlarm()->deadline());
writer_->Reset();

Powered by Google App Engine
This is Rietveld 408576698