From cb0a4d34a917ffda9d94eade99417cae489299c8 Mon Sep 17 00:00:00 2001 From: Yang Chi Date: Sat, 20 Feb 2021 12:05:37 -0800 Subject: [PATCH] Fix CongestionControlRecreatedWithNewFactory test Summary: The new controller happens to be the exact same address Reviewed By: lnicco Differential Revision: D26566423 fbshipit-source-id: 88fa04d2cf8b02ef20e7979f0055ee84903d33e9 --- quic/fizz/client/test/QuicClientTransportTest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quic/fizz/client/test/QuicClientTransportTest.cpp b/quic/fizz/client/test/QuicClientTransportTest.cpp index 19cdefe3d..f8e4d7a9b 100644 --- a/quic/fizz/client/test/QuicClientTransportTest.cpp +++ b/quic/fizz/client/test/QuicClientTransportTest.cpp @@ -5199,9 +5199,11 @@ TEST_F( // Check Cubic CC instance is recreated with new CC factory auto factory = std::make_shared(); client->setCongestionControllerFactory(factory); - client->setCongestionControl(CongestionControlType::Cubic); auto newCC = client->getConn().congestionController.get(); - EXPECT_NE(cc, newCC); + EXPECT_EQ(nullptr, newCC); + client->setCongestionControl(CongestionControlType::Cubic); + newCC = client->getConn().congestionController.get(); + EXPECT_NE(nullptr, newCC); EXPECT_EQ(factory->createdControllers, 1); }