tests: Pools-Abschnitt ohne Hintergrundprobe
Der einzeilige Endpoint in pools.sh nutzte den gemeinsamen P_GATED-Stub ohne probe_interval 0. Unter Last konnte die Probe den Stub einmal verfehlen und den Endpoint für offline_hold_s aus dem Verkehr nehmen; der Request kam dann als 503 statt "served by GATED" zurück. Der Abschnitt prüft Routing, nicht die Probe — probe_interval 0 und wait_port 30 wie in den anderen deterministischen Abschnitten. Tests: 524 OK, 0 FAIL.
This commit is contained in:
1 parent
3737571a82
commit
715aef2a8b
1 file changed
+5
-1
+5
-1
@@ -6,12 +6,13 @@ echo "== 20. Pools und einzeilige Endpunkt-Blöcke =="
|
||||
# 1. Einzeiliger Block: alles in einer Zeile, keine Klammerzeile nötig.
|
||||
cat > "$TMP/inline.conf" <<CFG
|
||||
listen 127.0.0.1:$((PORT+31))
|
||||
probe_interval 0
|
||||
endpoint kurz { base http://127.0.0.1:$P_GATED/v1; timeout 5; weight 2 }
|
||||
req for "*" pass kurz
|
||||
CFG
|
||||
./junction --config "$TMP/inline.conf" > "$TMP/inline.log" 2>&1 &
|
||||
PIDS+=($!)
|
||||
wait_port $((PORT+31)) 10
|
||||
wait_port $((PORT+31)) 30
|
||||
R=$(curl -s -m 10 -X POST -H 'Content-Type: application/json' \
|
||||
-d '{"model":"x","messages":[{"role":"user","content":"hi"}]}' \
|
||||
"http://127.0.0.1:$((PORT+31))/v1/chat/completions")
|
||||
@@ -23,6 +24,7 @@ grep -q 'endpoint kurz: block not closed' "$TMP/inline.log" && \
|
||||
# 2. Pool: eine Kette bekommt einen Namen, die Regel benutzt ihn.
|
||||
cat > "$TMP/pool.conf" <<CFG
|
||||
listen 127.0.0.1:$((PORT+32))
|
||||
probe_interval 0
|
||||
endpoint eins { base http://127.0.0.1:$P_GATED/v1 }
|
||||
endpoint zwei { base http://127.0.0.1:$((PORT+21))/v1 }
|
||||
|
||||
@@ -41,6 +43,7 @@ esac
|
||||
# 3. Verschachtelte Pools: alles → lokal → zwei Ziele
|
||||
cat > "$TMP/pool2.conf" <<CFG
|
||||
listen 127.0.0.1:$((PORT+33))
|
||||
probe_interval 0
|
||||
endpoint a { base http://127.0.0.1:$P_GATED/v1 }
|
||||
endpoint b { base http://127.0.0.1:$((PORT+21))/v1 }
|
||||
pool lokal a, b
|
||||
@@ -59,6 +62,7 @@ esac
|
||||
# 4. Ein unbekannter Name bleibt ein Fehler — kein stiller Durchlauf.
|
||||
cat > "$TMP/poolbad.conf" <<CFG
|
||||
listen 127.0.0.1:$((PORT+34))
|
||||
probe_interval 0
|
||||
endpoint a { base http://127.0.0.1:$P_GATED/v1 }
|
||||
req for "*" pass gibtesnicht
|
||||
CFG
|
||||
|
||||
Reference in new issue
Block a user