docs: 将仓库代码注释统一为中文
CI / docs-check (push) Canceled after 0s
CI / backend-test (push) Canceled after 0s
CI / service-test (push) Canceled after 0s
CI / frontend-test (push) Canceled after 0s
CI / rust-core (push) Canceled after 0s
CI / docs-check (pull_request) Canceled after 0s
CI / backend-test (pull_request) Canceled after 0s
CI / service-test (pull_request) Canceled after 0s
CI / frontend-test (pull_request) Canceled after 0s
CI / rust-core (pull_request) Canceled after 0s
CI / docs-check (push) Canceled after 0s
CI / backend-test (push) Canceled after 0s
CI / service-test (push) Canceled after 0s
CI / frontend-test (push) Canceled after 0s
CI / rust-core (push) Canceled after 0s
CI / docs-check (pull_request) Canceled after 0s
CI / backend-test (pull_request) Canceled after 0s
CI / service-test (pull_request) Canceled after 0s
CI / frontend-test (pull_request) Canceled after 0s
CI / rust-core (pull_request) Canceled after 0s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Single-worker localhost fixture for real Rust HTTP interoperability, never deployment."""
|
||||
"""用于真正 Rust HTTP 互操作性的单工作程序本地主机固定装置,无需部署。"""
|
||||
import asyncio
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Same-origin Vue console delivery and its public account workflow."""
|
||||
"""同源Vue控制台交付及其公众号工作流程。"""
|
||||
|
||||
import re
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Fault vectors for the production IO paths; database still uses an isolated fixture."""
|
||||
"""生产 IO 路径的故障向量;数据库仍然使用独立的固定装置。"""
|
||||
import hashlib
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
@@ -72,7 +72,7 @@ def test_download_is_verified_before_response_and_temp_files_are_removed(env):
|
||||
client, _, store, staging, _ = env
|
||||
auth, _, base = setup(client)
|
||||
sha = upload(client, base, auth)
|
||||
# This path must use streaming open(), never the full-object get().
|
||||
# 此路径必须使用流式 open(),而不是完整对象 get()。
|
||||
store.get = lambda key: pytest.fail("full-object read")
|
||||
response = client.get(base + "/objects/" + sha, headers=auth)
|
||||
assert response.content == b"controlled note"
|
||||
@@ -135,7 +135,7 @@ def test_slow_upload_fsync_does_not_block_worker_health(env, monkeypatch):
|
||||
pending = pool.submit(client.put, path + "?offset=0", headers=auth, content=b"abc")
|
||||
try:
|
||||
assert entered.wait(5)
|
||||
# Both requests use this TestClient's single ASGI event loop.
|
||||
# 两个请求都使用此 TestClient 的单个 ASGI 事件循环。
|
||||
health = pool.submit(client.get, "/health").result(timeout=2)
|
||||
assert health.status_code == 200
|
||||
assert not pending.done()
|
||||
@@ -167,7 +167,7 @@ def test_upload_limits_and_failed_fsync_preserve_durable_offset(env, monkeypatch
|
||||
patch.setattr(os, "fsync", failed)
|
||||
with pytest.raises(OSError, match="controlled fsync failure"):
|
||||
client.put(path + "?offset=0", headers=auth, content=data)
|
||||
# Failure propagated from the thread; the SQL transaction did not advance.
|
||||
# 从线程传播故障; SQL交易没有推进。
|
||||
assert client.get(path, headers=auth).json()["offset"] == 0
|
||||
assert (staging / info["upload_id"]).stat().st_size == 0
|
||||
assert client.put(path + "?offset=0", headers=auth, content=data).json() == {"offset": len(data)}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Bounded worker use, request cancellation, cached failures and recovery."""
|
||||
"""有限制的工作线程使用、请求取消、缓存故障和恢复。"""
|
||||
import asyncio
|
||||
from threading import Event
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_timeout_and_cancel_never_spawn_overlapping_dependency_probes():
|
||||
finally:
|
||||
release.set()
|
||||
await asyncio.gather(ready.running, return_exceptions=True)
|
||||
# A completed failed probe does not prevent a new healthy attempt.
|
||||
# 已完成的失败探测不会阻止新的健康尝试。
|
||||
ready.probe = lambda: None
|
||||
assert await ready.check() is True
|
||||
asyncio.run(run())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Real localhost HTTP harness; SQLite/DiskObjects, not production topology."""
|
||||
"""真实的 localhost HTTP 测试框架;使用 SQLite/DiskObjects,并非生产拓扑。"""
|
||||
import asyncio
|
||||
import json
|
||||
import socket
|
||||
|
||||
Reference in New Issue
Block a user