Skip to content

Commit

Permalink
4gw tests: retry on get spdk socket
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum authored and baum committed Jul 10, 2024
1 parent 8c66634 commit cc3cd43
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/ha/4gws_create_delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@ expect_optimized() {
EXPECTED_OPTIMIZED=$2
NQN=$3

socket=$(docker exec "$GW_NAME" find /var/run/ceph -name spdk.sock)
socket_retries=0
socket=""
while [ $socket_retries -lt 10 ] ; do
socket=$(docker exec "$GW_NAME" find /var/run/ceph -name spdk.sock)
if [ -n "$socket" ]; then
break
fi
socket_retries=$(expr $socket_retries + 1)
sleep 1
done
if [ -z "$socket" ]; then
exit 1 # failed
fi

# Verify expected number of "optimized"
for i in $(seq 50); do
response=$(docker exec "$GW_NAME" "$rpc" "-s" "$socket" "$cmd" "$NQN")
Expand Down

0 comments on commit cc3cd43

Please sign in to comment.