Commit a6098259 authored by TJ Yin's avatar TJ Yin Committed by Facebook GitHub Bot

fix tsan unit-test failure by reducing iteration

Reviewed By: yfeldblum

Differential Revision: D24724575

fbshipit-source-id: 2d7c6dbf94ee27638c92abfb94d8084beabb3d5e
parent 1540c39c
...@@ -149,8 +149,8 @@ TEST_F(CompressionContextPoolTest, testExplicitCreatorDeleter) { ...@@ -149,8 +149,8 @@ TEST_F(CompressionContextPoolTest, testExplicitCreatorDeleter) {
} }
TEST_F(CompressionContextPoolTest, testMultithread) { TEST_F(CompressionContextPoolTest, testMultithread) {
constexpr size_t numThreads = 64; constexpr size_t numThreads = 64 / (folly::kIsSanitizeThread ? 4 : 1);
constexpr size_t numIters = 1 << 14; constexpr size_t numIters = (1 << 14) / (folly::kIsSanitizeThread ? 4 : 1);
std::vector<std::thread> ts; std::vector<std::thread> ts;
for (size_t i = 0; i < numThreads; i++) { for (size_t i = 0; i < numThreads; i++) {
ts.emplace_back([& pool = *pool_]() { ts.emplace_back([& pool = *pool_]() {
......
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