You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2022/09/25 03:11:25 UTC

[incubator-kvrocks] 02/02: Fix should sleep 100ms instead of 1m in rwlock test

This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch fix/typos
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git

commit 5b11c8eb0293fb7e2a6b2d6ceddbc19af57cbef3
Author: git-hulk <hu...@gmail.com>
AuthorDate: Sun Sep 25 11:11:06 2022 +0800

    Fix should sleep 100ms instead of 1m in rwlock test
---
 tests/cppunit/rwlock_test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cppunit/rwlock_test.cc b/tests/cppunit/rwlock_test.cc
index 4c6ef90..30a7183 100644
--- a/tests/cppunit/rwlock_test.cc
+++ b/tests/cppunit/rwlock_test.cc
@@ -167,7 +167,7 @@ TEST(ReadWriteLock, WriteLockGurad_First) {
       });
     } else {
       ths[i] = std::thread([&rwlock, &val]() {
-        usleep(1000);  // To avoid it is the first to run, just sleep 100ms
+        usleep(100000);  // To avoid it is the first to run, just sleep 100ms
         auto ptr = std::unique_ptr<RWLock::ReadLock>(new RWLock::ReadLock(rwlock));
         ASSERT_EQ(val, 3);
       });