test: fix port selection to disable grep output
This commit is contained in:
parent
4dd0aece02
commit
624b76e86e
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ get_free_port() {
|
|||
|
||||
while true; do
|
||||
port=$((RANDOM % 10000 + 10000))
|
||||
netstat -aln | grep '^\(tcp\|udp\).*[:.]'"$port " && continue
|
||||
netstat -aln | grep -q '^\(tcp\|udp\).*[:.]'"$port " && continue
|
||||
break
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue