bastif pushed to branch master at Debian Java Maintainers / css-validator


Commits:
c50ee31a by Fab Stz at 2026-03-06T18:44:18+01:00
d/t/webapp_validate_common.sh: wait longer until server is ready

Because on riscv64 60 iterations is not sufficient

- - - - -
8e4340ea by Fab Stz at 2026-03-06T19:11:44+01:00
d/t/webapp_validate_common.sh: rephrase string

- - - - -
29d30bd2 by Fab Stz at 2026-03-06T19:12:25+01:00
Update changelog for 0~20250226+dfsg-3 release

- - - - -


2 changed files:

- debian/changelog
- debian/tests/webapp_validate_common.sh


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+css-validator (0~20250226+dfsg-3) unstable; urgency=medium
+
+  * d/tests: properly set value of $PORT or $port
+  * d/t/webapp_validate_common.sh: wait longer until server is ready
+  * d/t/webapp_validate_common.sh: rephrase string
+
+ -- Fab Stz <[email protected]>  Fri, 06 Mar 2026 19:12:07 +0100
+
 css-validator (0~20250226+dfsg-2) unstable; urgency=medium
 
   * d/tests: move common code to start_server() function


=====================================
debian/tests/webapp_validate_common.sh
=====================================
@@ -17,53 +17,55 @@ debug_failure()
 
 wait_until_not_state()
 {
-  local server state count
+  local server state count count_max
   server="$1"
   state="$2"
   count=0
+  count_max=180
   echo "Leaving state '$state' and entering state '$(systemctl show -P 
ActiveState "$server")'."
   TIMEFORMAT='Elapsed time is %R seconds.'
   { time {
   while [ "$(systemctl show -P ActiveState "$server")" == "$state" ] ; do
-    if [ $count -gt 60 ]; then
+    if [ $count -gt $count_max ]; then
       break
     fi
     count=$((count + 1))
     sleep 1
   done
   } } 2>&1
-  if [ ! $count -gt 60 ]; then
+  if [ ! $count -gt $count_max ]; then
     echo "Success."
   else
-    echo "Failed (reached timeout)."
-    debug_failure
+    echo "Failed (reached max count '$count_max')." >&2
+    debug_failure >&2
     exit 1
   fi
 }
 
 wait_until_ready()
 {
-  local server port count
+  local server port count count_max
   server="$1"
   port="$2"
   path="$3"
   count=0
-  echo "Waiting until $server is up and running at 
http://localhost:${port}/$path";
+  count_max=180
+  echo "Waiting until servlet on $server is ready at 
http://localhost:${port}/$path";
   TIMEFORMAT='Elapsed time is %R seconds.'
   { time {
   while ! nc -z localhost "${port}" >/dev/null 2>&1 && [[ "$(curl -s -o 
/dev/null -w ''%{http_code}'' http://localhost:${port}/$path)" != "200" ]]; do
-    if [ $count -gt 60 ]; then
+    if [ $count -gt $count_max ]; then
       break
     fi
     count=$((count + 1))
     sleep 1
   done
   } } 2>&1
-  if [ ! $count -gt 60 ]; then
+  if [ ! $count -gt $count_max ]; then
     echo "Success."
   else
-    echo "Failed (reached timeout)."
-    debug_failure
+    echo "Failed (reached max count '$count_max')." >&2
+    debug_failure >&2
     exit 1
   fi
 }



View it on GitLab: 
https://salsa.debian.org/java-team/css-validator/-/compare/73e27fc2ae46a2d2415f4fe8b4fe82fea8751428...29d30bd296eb26fb89be2748ecca42a834c35475

-- 
View it on GitLab: 
https://salsa.debian.org/java-team/css-validator/-/compare/73e27fc2ae46a2d2415f4fe8b4fe82fea8751428...29d30bd296eb26fb89be2748ecca42a834c35475
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
pkg-java-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to