Skip to content

Commit

Permalink
Merge pull request #820 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
PR: gh-810 fixes for LC selection and added more tests to LC selftests
  • Loading branch information
UltraInstinct14 authored Oct 2, 2024
2 parents 79718ab + 2c34530 commit 49c623f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions cicd/tcplblc/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ do
done
done

$hexec l3h1 nohup nc -d ${servIP[0]} 2020 &
$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 &
$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 &
$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 &
$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 &
sleep 5

echo "Testing Service IP: ${servIP[0]}"
Expand All @@ -69,6 +72,25 @@ do
done
done

$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 &
sleep 5

echo "Testing Service IP: ${servIP[0]}"
lcode=0
for i in {1..4}
do
for j in {0..2}
do
res=$($hexec l3h1 curl --max-time 10 -s ${servIP[0]}:2020)
echo $res
if [[ $res != "server3" ]]
then
lcode=1
fi
sleep 1
done
done

if [[ $lcode == 0 ]]
then
echo SCENARIO-tcplb with least-connection [OK]
Expand All @@ -77,8 +99,8 @@ else
code=1
fi

sudo killall -9 node 2>&1 > /dev/null
sudo killall -9 nc 2>&1 > /dev/null
sudo killall -9 node 2>&1 > /dev/null
rm -f nohup.out

exit $code
2 changes: 1 addition & 1 deletion loxilb-ebpf

0 comments on commit 49c623f

Please sign in to comment.