Avoid service overhead about checking netstat ports
authorEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Mon, 11 May 2020 17:03:12 +0000 (19:03 +0200)
committerEduardo Ramos Testillano (eramedu) <eduardo.ramos.testillano@ericsson.com>
Mon, 11 May 2020 17:03:12 +0000 (19:03 +0200)
CT script procedure starts the service and then check for
availability. This check was being hard (no sleep between
retries). Now, 1 second is lapsed in every check.

example/diameter/launcher/resources/rest_api/ct/ct.sh

index 4d485df..1ae0224 100755 (executable)
@@ -47,6 +47,7 @@ do
   docker exec -it ${C_NAME} bash -c "netstat -p $(pgrep ADML) --numeric-ports | grep -w 3868 | grep -w ESTABLISHED" >/dev/null
   [ $? -eq 0 ] && break
   echo -n .
+  sleep 1
 done
 echo "Ready !"