Close retained connectors on worker shutdown

This commit is contained in:
udo
2026-07-20 14:04:39 +00:00
parent 80eaf0b69b
commit e22cbf8882
4 changed files with 22 additions and 2 deletions
@@ -108,4 +108,15 @@ third=$(request /database.uce)
IFS='|' read -r third_pid third_id third_source <<<"$third"
[[ "$third_pid" == "$first_pid" && "$third_source" == "new" && "$third_id" != "$first_id" ]]
sleep 3
plain=$(request /plain.uce)
[[ "$plain" == "$first_pid|plain" ]]
deadline=$((SECONDS + 5))
while (( SECONDS < deadline )); do
connections=$(mariadb --batch --skip-column-names -e "SELECT COUNT(*) FROM information_schema.PROCESSLIST WHERE USER='$test_user'")
[[ "$connections" == "0" ]] && break
sleep 0.05
done
[[ "$connections" == "0" ]] || { echo "final pooled fixture connection remained after idle eviction" >&2; exit 1; }
echo "Persistent MySQL idle eviction preserved hot reuse and retired the expired connection"