diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2017-10-10 19:50:44 +0000 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-10-10 20:03:58 +0000 |
commit | 6dc696f5d6adc6cdfa8dad053cd2def1ce56a025 (patch) | |
tree | 1aa6a7dcc3324f7ebb716603cc5b38b09e27d997 /test/csit/scripts/policy/wait_for_port.sh | |
parent | e162e58e082206ad17b93befea082e16cccadd60 (diff) |
Reduce time spent waiting for spin up
The wait times are way too large. I've added similar script used in
the docker images to wait for the port to open.
Reduced overal time.
Fixed API call to get Configs. Should be: ".*" not "*.*"
Removed fake policy tests.
Issue-ID: POLICY-299
Change-Id: I4076ef8935dd128f1e240202083ce5567e70a67b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'test/csit/scripts/policy/wait_for_port.sh')
-rwxr-xr-x | test/csit/scripts/policy/wait_for_port.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/csit/scripts/policy/wait_for_port.sh b/test/csit/scripts/policy/wait_for_port.sh new file mode 100755 index 000000000..10f08ded1 --- /dev/null +++ b/test/csit/scripts/policy/wait_for_port.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "Usage: wait-for-port hostname port" >&2 + exit 1 +fi + +host=$1 +port=$2 + +echo "Waiting for $host port $port open" +until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do + sleep 1 +done + +echo "$host port $port is open" + +exit 0 |