mirror of
https://github.com/ceph/ceph
synced 2025-03-30 15:31:01 +00:00
tests: Moving sleep call after action in ceph_watch_wait()
ceph_watch_wait() is doing a sleep _before_ doing the test which could stop this loop. It's better doing the action first as it could exit immediately and avoid a useless sleep. That's a minor optimization but everything count when trying to get something smooth. Signed-off-by: Erwan Velu <erwan@redhat.com>
This commit is contained in:
parent
1b7991e92e
commit
8a49a86901
@ -170,8 +170,8 @@ function ceph_watch_wait()
|
||||
fi
|
||||
|
||||
for i in `seq ${timeout}`; do
|
||||
sleep 1
|
||||
grep -q "$regexp" $CEPH_WATCH_FILE && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
kill $CEPH_WATCH_PID
|
||||
|
Loading…
Reference in New Issue
Block a user