System design URL shortener: Spring Boot 4.1.1, base62 ids, Redis cache-aside, Redis Lua token bucket, 24 tests and live transcripts

This commit is contained in:
2026-10-22 08:13:35 +00:00
commit aa61ed8786
51 changed files with 1717 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Runs the tests and writes one line per test (from the Surefire XML) to output/09-test-results.txt.
set -euo pipefail
cd "$(dirname "$0")/.."
mvn -B -q test > /dev/null
python3 - <<'PY' > output/09-test-results.txt
import glob, xml.etree.ElementTree as ET
total = fail = 0
for f in sorted(glob.glob("target/surefire-reports/TEST-*.xml")):
root = ET.parse(f).getroot()
cls = root.get("name").rsplit(".", 1)[-1]
for tc in root.iter("testcase"):
bad = tc.find("failure") is not None or tc.find("error") is not None
total += 1; fail += bad
print(("FAIL " if bad else "PASS ") + cls + "." + tc.get("name"))
print(f"{total} tests, {fail} failures")
PY