gfe-relnote: Do not flush clear coalesced packets while sending multiple connection close packets. Protected by --gfe2_reloadable_flag_quic_close_all_encryptions_levels2
PiperOrigin-RevId: 282844268
Change-Id: I005056ad594f776a9a36198d012f7169737622b3
diff --git a/quic/test_tools/quic_connection_peer.cc b/quic/test_tools/quic_connection_peer.cc
index 79fc7e3..7b9264c 100644
--- a/quic/test_tools/quic_connection_peer.cc
+++ b/quic/test_tools/quic_connection_peer.cc
@@ -333,5 +333,18 @@
connection->SendConnectionClosePacket(error, details);
}
+// static
+size_t QuicConnectionPeer::GetNumEncryptionLevels(QuicConnection* connection) {
+ size_t count = 0;
+ for (EncryptionLevel level :
+ {ENCRYPTION_INITIAL, ENCRYPTION_HANDSHAKE, ENCRYPTION_ZERO_RTT,
+ ENCRYPTION_FORWARD_SECURE}) {
+ if (connection->framer_.HasEncrypterOfEncryptionLevel(level)) {
+ ++count;
+ }
+ }
+ return count;
+}
+
} // namespace test
} // namespace quic
diff --git a/quic/test_tools/quic_connection_peer.h b/quic/test_tools/quic_connection_peer.h
index 3ded2e0..b7140de 100644
--- a/quic/test_tools/quic_connection_peer.h
+++ b/quic/test_tools/quic_connection_peer.h
@@ -133,6 +133,8 @@
static void SendConnectionClosePacket(QuicConnection* connection,
QuicErrorCode error,
const std::string& details);
+
+ static size_t GetNumEncryptionLevels(QuicConnection* connection);
};
} // namespace test