Fix ReplacePeerIssuedConnectionIdOnBothPathsTriggeredByNewConnectionIdFrame failure with random flags in //third_party/quic/core:quic_connection_test
Alternative_path_ will be populated only if count_bytes_on_alternative_path_separately_ is true.
Tested with:
//third_party/quic/core:quic_connection_test --test_arg=--v=1 --test_arg='--gfe2_invert_all_feature_flags_for_test=true' --test_arg=--gfe2_feature_flags_randomize_for_test=8411385658150343436
http://sponge2/a2c84bbf-ab75-4375-96eb-5710f58d88f8
PiperOrigin-RevId: 371137418
Change-Id: I0fae89c296bd55c39df76f2144afc28b4f29fa66
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index f752a55..d89d87d 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -1246,6 +1246,10 @@
return connection_migration_use_new_cid_;
}
+ bool count_bytes_on_alternative_path_separately() const {
+ return count_bytes_on_alternative_path_separately_;
+ }
+
// Instantiates connection ID manager.
void CreateConnectionIdManager();
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index d806835..00af323 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -14588,7 +14588,8 @@
QuicConnectionTest,
ReplacePeerIssuedConnectionIdOnBothPathsTriggeredByNewConnectionIdFrame) {
if (!version().HasIetfQuicFrames() || !connection_.use_path_validator() ||
- !connection_.use_connection_id_on_default_path()) {
+ !connection_.use_connection_id_on_default_path() ||
+ !connection_.count_bytes_on_alternative_path_separately()) {
return;
}
QuicConnectionPeer::EnableMultipleConnectionIdSupport(&connection_);