Add retry support to quic_client_interop_test gfe-relnote: n/a, test-only PiperOrigin-RevId: 274644470 Change-Id: Ie68fd26ad452d6489d3fffeba88bcb2bf54e475d
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 398fc03..5c350e9 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -651,6 +651,7 @@ return; } retry_has_been_parsed_ = true; + stats_.retry_packet_processed = true; QUIC_DLOG(INFO) << "Received RETRY, replacing connection ID " << server_connection_id_ << " with " << new_connection_id << ", received token "
diff --git a/quic/core/quic_connection_stats.cc b/quic/core/quic_connection_stats.cc index c08f939..128bc93 100644 --- a/quic/core/quic_connection_stats.cc +++ b/quic/core/quic_connection_stats.cc
@@ -47,7 +47,8 @@ connection_creation_time(QuicTime::Zero()), blocked_frames_received(0), blocked_frames_sent(0), - num_connectivity_probing_received(0) {} + num_connectivity_probing_received(0), + retry_packet_processed(false) {} QuicConnectionStats::QuicConnectionStats(const QuicConnectionStats& other) = default; @@ -94,7 +95,10 @@ os << " blocked_frames_received: " << s.blocked_frames_received; os << " blocked_frames_sent: " << s.blocked_frames_sent; os << " num_connectivity_probing_received: " - << s.num_connectivity_probing_received << " }"; + << s.num_connectivity_probing_received; + os << " retry_packet_processed: " + << (s.retry_packet_processed ? "yes" : "no"); + os << " }"; return os; }
diff --git a/quic/core/quic_connection_stats.h b/quic/core/quic_connection_stats.h index 17a3a1e..805afd1 100644 --- a/quic/core/quic_connection_stats.h +++ b/quic/core/quic_connection_stats.h
@@ -106,6 +106,9 @@ // Number of connectivity probing packets received by this connection. uint64_t num_connectivity_probing_received; + + // Whether a RETRY packet was successfully processed. + bool retry_packet_processed; }; } // namespace quic
diff --git a/quic/tools/quic_client_interop_test_bin.cc b/quic/tools/quic_client_interop_test_bin.cc index d6a1da2..3bbb5c5 100644 --- a/quic/tools/quic_client_interop_test_bin.cc +++ b/quic/tools/quic_client_interop_test_bin.cc
@@ -34,7 +34,8 @@ kConnectionClose, // An H3 transaction succeeded. kHttp3, - // TODO(nharper): Add Retry to list of tested features. + // A RETRY packet was successfully processed. + kRetry, }; char MatrixLetter(Feature f) { @@ -49,6 +50,8 @@ return 'C'; case Feature::kHttp3: return '3'; + case Feature::kRetry: + return 'S'; } } @@ -95,6 +98,12 @@ while (client->WaitForEvents()) { } + QuicConnectionStats client_stats = + client->session()->connection()->GetStats(); + if (client_stats.retry_packet_processed) { + features.insert(Feature::kRetry); + } + if (!client->connected()) { return features; }