Commit ec7f9f6f authored by Nicholas Ormrod's avatar Nicholas Ormrod Committed by Facebook GitHub Bot

Fix broken singleton test

Summary: This test regularly fails on account of timing. Remove the timing upper bound.

Reviewed By: yfeldblum

Differential Revision: D33271470

fbshipit-source-id: 1369ef45bd49e500c35816bfdb21869f346b6f70
parent 6fcea2fc
......@@ -335,9 +335,7 @@ TEST(Singleton, SharedPtrUsage) {
auto start_time = std::chrono::steady_clock::now();
vault.destroyInstances();
auto duration = std::chrono::steady_clock::now() - start_time;
EXPECT_TRUE(
duration > std::chrono::seconds{4} &&
duration < std::chrono::seconds{folly::kIsSanitizeAddress ? 30 : 6});
EXPECT_TRUE(duration > std::chrono::seconds{4});
}
EXPECT_EQ(vault.registeredSingletonCount(), 4);
EXPECT_EQ(vault.livingSingletonCount(), 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment