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(); |