From 06fb75cc284e34a8538311e719d93d606a08e83e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 09:36:03 +0000 Subject: [PATCH] Torture harness: a shared-cache lock reported as HTTP 400 is the documented P12 case Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EwkLo2rJWidpkDVT3HkvNv --- tests/connection_torture.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/connection_torture.py b/tests/connection_torture.py index c377d66c..eaa6e5ca 100644 --- a/tests/connection_torture.py +++ b/tests/connection_torture.py @@ -607,14 +607,17 @@ class Torture: # 404: data or the database page during an external change self.count(f"http {response.status_code} (expected)") return - if response.status_code == 500 and ( + if response.status_code in (400, 500) and ( "schema is locked" in response.text or "table is locked" in response.text ): # SQLITE_LOCKED from the shared-cache in-memory database: it - # does not wait for locks (documented, the same on main) + # does not wait for locks (documented, the same on main). The + # table page reports it as a 400 "Invalid SQL" (P45) with self.lock: - self.expected_errors["http 500: shared-cache lock"] += 1 + self.expected_errors[ + f"http {response.status_code}: shared-cache lock" + ] += 1 return self.problem( "http", f"GET {path} -> {response.status_code}: {response.text[:300]}"