]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/common/test_fair_mutex: increase NR_ROUNDS from 256 to 512
authorKefu Chai <kchai@redhat.com>
Wed, 18 Aug 2021 06:10:03 +0000 (14:10 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 13 Sep 2021 06:17:52 +0000 (14:17 +0800)
so the test is more tolerant.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ab3dc0811baa17ff03c777d71f4ebe096a650cec)

src/test/common/test_fair_mutex.cc

index 2eaf67b54c370c5c192181739766c2e12fe532cf..10ba835a2ddb4b9479e8a152bda258712231c057 100644 (file)
@@ -34,7 +34,7 @@ TEST(FairMutex, fair)
   ceph::fair_mutex mutex{"fair::fair"};
   const int NR_TEAMS = 2;
   std::array<unsigned, NR_TEAMS> scoreboard{0, 0};
-  const int NR_ROUNDS = 256;
+  const int NR_ROUNDS = 512;
   auto play = [&](int team) {
     for (int i = 0; i < NR_ROUNDS; i++) {
       std::unique_lock lock{mutex};