]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados: Use a call that can sleep for fractions of seconds
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 28 Sep 2022 21:33:23 +0000 (17:33 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 30 Sep 2022 17:54:31 +0000 (13:54 -0400)
sleep(2) accepts an integral argument and `.01` rounds down to
zero. Use a sleep function that sleep for fractions of a second.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/test/librados/aio_cxx.cc

index c4af016ee3c776579dda8ff15a28c8a0655d1efa..31914ff1b56ea453b855966bc910dae54d8f4c58 100644 (file)
@@ -2316,7 +2316,7 @@ TEST(LibRadosAio, PoolEIOFlag) {
        });
     }
 
-    sleep(.01);
+    std::this_thread::sleep_for(10'000us);
     my_lock.lock();
     if (r < 0) {
       inflight.erase(i);