summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/env/start-swift-ceph.sh
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests/env/start-swift-ceph.sh')
-rwxr-xr-xapps/files_external/tests/env/start-swift-ceph.sh17
1 files changed, 4 insertions, 13 deletions
diff --git a/apps/files_external/tests/env/start-swift-ceph.sh b/apps/files_external/tests/env/start-swift-ceph.sh
index ea16e167af9..936bb667e94 100755
--- a/apps/files_external/tests/env/start-swift-ceph.sh
+++ b/apps/files_external/tests/env/start-swift-ceph.sh
@@ -57,19 +57,10 @@ echo "${docker_image} container: $container"
echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift
echo -n "Waiting for ceph initialization"
-starttime=$(date +%s)
-# support for GNU netcat and BSD netcat
-while ! (nc -c -w 1 ${host} 80 </dev/null >&/dev/null \
- || nc -w 1 ${host} 80 </dev/null >&/dev/null); do
- sleep 1
- echo -n '.'
- if (( $(date +%s) > starttime + 60 )); then
- echo
- echo "[ERROR] Waited 60 seconds, no response" >&2
- exit 1
- fi
-done
-echo
+if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then
+ echo "[ERROR] Waited 60 seconds, no response" >&2
+ exit 1
+fi
sleep 1
cat > $thisFolder/config.swift.php <<DELIM