From efdffec2fd1d443d8590bb600ee868391a921218 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Fri, 13 Sep 2024 08:25:39 -0700 Subject: [PATCH] fix test after changes to folly::io::Cursor Summary: {D62460851} changes the return type of `folly::io::Cursor::peek()` and should have changed all uses in the same commit, but this use slipped through. Reviewed By: DenisYaroshevskiy Differential Revision: D62641264 fbshipit-source-id: 1ea01d2f7a15fbf23627594e710087825bbc2ee6 --- quic/server/test/QuicServerTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quic/server/test/QuicServerTest.cpp b/quic/server/test/QuicServerTest.cpp index cb737f488..e3668ab80 100644 --- a/quic/server/test/QuicServerTest.cpp +++ b/quic/server/test/QuicServerTest.cpp @@ -1917,9 +1917,9 @@ void QuicServerWorkerTakeoverTest::testPacketForwarding( EXPECT_EQ(protocotVersion, 0x0000001); uint16_t addrLen = (cursor.readBE()); struct sockaddr* sockaddr = nullptr; - std::pair addrData = cursor.peek(); - EXPECT_GE(addrData.second, addrLen); - sockaddr = (struct sockaddr*)addrData.first; + auto addrData = cursor.peek(); + EXPECT_GE(addrData.size(), addrLen); + sockaddr = (struct sockaddr*)addrData.data(); cursor.skip(addrLen); folly::SocketAddress actualClient;