Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit f98a67a

Browse files
committed
Revert changes to ./src/external/run_test.sh from commit b589ba9
1 parent 58ffa93 commit f98a67a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/external/run_test.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,24 @@ cd -
2828

2929
destroy_worker()
3030
{
31-
PID=$(pidof WorkerServer_9090) || true
32-
echo ${PID}
33-
if [ ! -z "${PID}" ] ; then
34-
kill -9 ${PID}
35-
fi
36-
sleep 2s
31+
STATUS=$(lsof -i:9090 | tail -n 1 | awk {'print $NF'})
32+
33+
while [ "${STATUS}" != "EMPTY" ]
34+
do
35+
if [ "${STATUS}" == "(LISTEN)" ] ; then
36+
echo "LISTEN"
37+
PID=$(lsof -i:9090 | tail -n 1 | awk {'print $2'})
38+
echo ${PID}
39+
if [ ! -z "${PID}" ] ; then
40+
kill -9 ${PID}
41+
STATUS="EMPTY"
42+
fi
43+
sleep 2s
44+
else
45+
echo "EMPTY"
46+
STATUS="EMPTY"
47+
fi
48+
done
3749
}
3850

3951
if [ "${REPO}" = "oss" ] ; then
@@ -63,6 +75,7 @@ if [ "${REPO}" = "oss" ] ; then
6375

6476
# distributed_encoder test
6577
################################
78+
sudo yum install lsof -y
6679

6780
cd distributed_encoder
6881
cp ../../../distributed_encoder/test/*265 .

0 commit comments

Comments
 (0)