From bcd0d7827683c1dd8a8d6d1820af7b53c7f20b43 Mon Sep 17 00:00:00 2001 From: Tianjiao Yin Date: Sat, 18 Nov 2017 06:39:09 -0800 Subject: [PATCH] reduce the number of iteration when test SharedMutexTest in ASAN mode Summary: This unit-test takes too long to finish in ASAN mode from heavily loaded system (more than 10 minutes). Reviewed By: yfeldblum Differential Revision: D6362111 fbshipit-source-id: b097eff60f88ace4fb869132598806700804e267 --- folly/test/SharedMutexTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/test/SharedMutexTest.cpp b/folly/test/SharedMutexTest.cpp index 9e04edc7..f27ba1bc 100644 --- a/folly/test/SharedMutexTest.cpp +++ b/folly/test/SharedMutexTest.cpp @@ -1052,14 +1052,14 @@ TEST(SharedMutex, deterministic_lost_wakeup_write_prio) { } TEST(SharedMutex, mixed_mostly_write_read_prio) { - for (int pass = 0; pass < 5; ++pass) { + for (int pass = 0; pass < (folly::kIsSanitizeAddress ? 1 : 5); ++pass) { runMixed( 50000, 300, 0.9, false); } } TEST(SharedMutex, mixed_mostly_write_write_prio) { - for (int pass = 0; pass < 5; ++pass) { + for (int pass = 0; pass < (folly::kIsSanitizeAddress ? 1 : 5); ++pass) { runMixed( 50000, 300, 0.9, false); } @@ -1229,7 +1229,7 @@ TEST(SharedMutex, remote_write_prio) { } TEST(SharedMutex, remote_read_prio) { - for (int pass = 0; pass < 100; ++pass) { + for (int pass = 0; pass < (folly::kIsSanitizeAddress ? 1 : 100); ++pass) { runRemoteUnlock(100000, 0.1, 0.1, 5, 5); } } -- 2.34.1