mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
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 <erwan@redhat.com>
This commit is contained in:
parent
8a49a86901
commit
62bdde2cd2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user