From db7891bf708146667b55818fc26c0dfdfb224402 Mon Sep 17 00:00:00 2001 From: Hani Damlaj Date: Thu, 7 Nov 2024 00:50:25 -0800 Subject: [PATCH] no-op FakeOneRttHandshakeLayer::getApplicationProtocol() Summary: change from throwing an error in ::getApplicationProtocol to returning a folly::none Reviewed By: lnicco Differential Revision: D65586021 fbshipit-source-id: 1d4be761351960dbc1e48800cdd099a7b13df0e5 --- quic/fizz/client/test/QuicClientTransportTestUtil.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quic/fizz/client/test/QuicClientTransportTestUtil.h b/quic/fizz/client/test/QuicClientTransportTestUtil.h index 23bdeaada..9127f3c35 100644 --- a/quic/fizz/client/test/QuicClientTransportTestUtil.h +++ b/quic/fizz/client/test/QuicClientTransportTestUtil.h @@ -344,6 +344,7 @@ class FakeOneRttHandshakeLayer : public FizzClientHandshake { std::unique_ptr oneRttWriteCipher_; std::unique_ptr oneRttWriteHeaderCipher_; + Optional alpn_{folly::none}; FizzCryptoFactory cryptoFactory_; const CryptoFactory& getCryptoFactory() const override { @@ -359,7 +360,7 @@ class FakeOneRttHandshakeLayer : public FizzClientHandshake { "getReadRecordLayerEncryptionLevel not implemented"); } const Optional& getApplicationProtocol() const override { - throw std::runtime_error("getApplicationProtocol not implemented"); + return alpn_; } void processSocketData(folly::IOBufQueue&) override { throw std::runtime_error("processSocketData not implemented");