From: Yan Jun Date: Wed, 30 Mar 2016 03:35:41 +0000 (+0800) Subject: test/throttle: add usleep for Thread_get::entry X-Git-Tag: v11.0.0~713^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11333961cebd5ee4a388c448541e57c43ea3dc39;p=ceph.git test/throttle: add usleep for Thread_get::entry In the test case ThrottleTest.get, we try to delay one or a few microseconds to do throttle.put that will wake up a waited throttle, and we expect t.waited is false for short delay and true for long delay, however the result did not meet our expectations since even one microseconds is too long. Maybe we should add usleep for Thread_get::entry. Signed-off-by: Yan Jun --- diff --git a/src/test/common/Throttle.cc b/src/test/common/Throttle.cc index 804b12b3fecc..3581fd3363a6 100644 --- a/src/test/common/Throttle.cc +++ b/src/test/common/Throttle.cc @@ -52,6 +52,7 @@ protected: } virtual void *entry() { + usleep(5); waited = throttle.get(count); throttle.put(count); return NULL;