File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ function message() {
66 echo " $( date +" %T" ) : $1 "
77}
88
9+ function healthcheck() {
10+ local url=$1
11+
12+ while true ; do
13+ if [[ $( curl -fso /dev/null -w " %{http_code}" " ${url} " ) = 200 ]]; then
14+ break
15+ fi
16+ done
17+ }
18+
919type=$1
1020
1121if [ -n " $CI_JOB_TOKEN " ]; then
@@ -44,6 +54,17 @@ for app in *; do
4454
4555 for i in $( seq 1 $REPETITIONS_COUNT ) ; do
4656 bash -c " ${UTILS_DIR} /../${type} /${app} /start-servers.sh" &
57+
58+ if [ " ${app} " == " petclinic" ]; then
59+ for port in $( seq 8080 8085) ; do
60+ healthcheck http://localhost:$port
61+ done
62+ elif [ " ${app} " == " insecure-bank" ]; then
63+ for port in $( seq 8080 8088) ; do
64+ healthcheck http://localhost:$port /login
65+ done
66+ fi
67+
4768 (
4869 cd ${app} &&
4970 bash -c " ${CPU_AFFINITY_K6}${UTILS_DIR} /run-k6-load-test.sh ${HEALTHCHECK_URL} 'pkill java'"
You can’t perform that action at this time.
0 commit comments