]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: Optmizing sleep sequence in cephtool/test.sh
authorErwan Velu <erwan@redhat.com>
Wed, 23 Mar 2016 09:45:33 +0000 (10:45 +0100)
committerErwan Velu <erwan@redhat.com>
Tue, 5 Apr 2016 07:36:25 +0000 (09:36 +0200)
The actual code double the wait time between two calls leading to a
possible 511s of waiting time which sounds a little bit excessive.

This patch offer to reduce the global wait time to 300s and test more
often the rados status to exit the loop earlier. In a local test, that
saves 6 secs per run.
Signed-off-by: Erwan Velu <erwan@redhat.com>
qa/workunits/cephtool/test.sh

index 7f933ee35fb01210bbea4a062ce64bc6419311c1..bf035ece3ea1c280c31b562c7ad463e9ca8619cb 100755 (executable)
@@ -248,24 +248,24 @@ function test_tiering_agent()
   # wait for the object to be evicted from the cache
   local evicted
   evicted=false
-  for i in 1 2 4 8 16 32 64 128 256 ; do
+  for i in `seq 1 300` ; do
       if ! rados -p $fast ls | grep obj1 ; then
           evicted=true
           break
       fi
-      sleep $i
+      sleep 1
   done
   $evicted # assert
   # the object is proxy read and promoted to the cache
   rados -p $slow get obj1 - >/dev/null
   # wait for the promoted object to be evicted again
   evicted=false
-  for i in 1 2 4 8 16 32 64 128 256 ; do
+  for i in `seq 1 300` ; do
       if ! rados -p $fast ls | grep obj1 ; then
           evicted=true
           break
       fi
-      sleep $i
+      sleep 1
   done
   $evicted # assert
   ceph osd tier remove-overlay $slow