From: Erwan Velu Date: Wed, 23 Mar 2016 09:45:33 +0000 (+0100) Subject: tests: Optmizing sleep sequence in cephtool/test.sh X-Git-Tag: v10.1.1~3^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62bdde2cd2acbfaf0a74d382f9a44258053b47d3;p=ceph.git tests: Optmizing sleep sequence in cephtool/test.sh 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 --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 7f933ee35fb..bf035ece3ea 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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