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); }