aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2019-05-07 01:33:41 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-07 01:33:41 +0000
commit308f4c044e6e57da8d0f3913f33a8395c6df09ec (patch)
tree01ec76b3bb577410629b4b12cadee78a0e4d488d
parent4b58c7a1389d9f0eef1f092b161b7c3a353cc174 (diff)
parent0a8566302dd0c9cce65497611c1808c82328959f (diff)
Merge "Don't wait forever for jdwp response"
-rwxr-xr-xtest/security/check_for_jdwp.sh3
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