diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2019-05-07 01:33:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-07 01:33:41 +0000 |
commit | 308f4c044e6e57da8d0f3913f33a8395c6df09ec (patch) | |
tree | 01ec76b3bb577410629b4b12cadee78a0e4d488d | |
parent | 4b58c7a1389d9f0eef1f092b161b7c3a353cc174 (diff) | |
parent | 0a8566302dd0c9cce65497611c1808c82328959f (diff) |
Merge "Don't wait forever for jdwp response"
-rwxr-xr-x | test/security/check_for_jdwp.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/security/check_for_jdwp.sh b/test/security/check_for_jdwp.sh index 7bcbade64..0facbff69 100755 --- a/test/security/check_for_jdwp.sh +++ b/test/security/check_for_jdwp.sh @@ -47,7 +47,8 @@ do_jdwp_handshake() { local jdwp_challenge="JDWP-Handshake\n" local jdwp_response="JDWP-Handshake" - local response=`nc $ip $port <<<$jdwp_challenge` + # 10s timeout to avoid hangs when service doesn't answer at all + local response=`nc -w 10 $ip $port <<<$jdwp_challenge | tr '\0' '\n'` if [[ $response == *"$jdwp_response"* ]]; then return 0 fi |