diff --git a/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp b/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp index f00fe12496a..3df3e0aac2f 100644 --- a/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp +++ b/thrift/lib/cpp2/test/util/ScopedServerThreadTest.cpp @@ -56,5 +56,5 @@ TEST(ScopedServerThreadTest, BindFailure) { server->setAddress(address); EXPECT_THROW(std::make_unique(server), exception); // Make sure there wasn't a leak of the ThriftServer, (cf. t13139338). - EXPECT_TRUE(server.unique()); + EXPECT_EQ(1, server.use_count()); }