test(tests): make the body-retry, websocket debug-entry and gzip segment tests deterministic

This commit is contained in:
imSp4rky
2026-12-05 10:13:04 -07:00
parent 00ad15527c
commit 9de59f3142
4 changed files with 16 additions and 10 deletions
+4 -4
View File
@@ -54,15 +54,15 @@ class _Handler(BaseHTTPRequestHandler):
server.release.wait(5)
with server.lock:
server.others_done_at_release = len(server.served)
with server.lock:
server.served.append(header)
if not held and len(server.served) == 7:
server.release.set()
self.send_response(206)
self.send_header("Content-Range", f"bytes {start}-{end}/{len(BODY)}")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
with server.lock:
server.served.append(header)
if not held and len(server.served) == 7:
server.release.set()
def test_fast_connection_takes_the_parts_a_held_connection_cannot(tmp_path, monkeypatch):