fix(iwooos): honor production database budget

This commit is contained in:
ogt
2026-07-11 20:24:12 +08:00
parent c241ab72dc
commit caf208315e
2 changed files with 19 additions and 6 deletions

View File

@@ -246,6 +246,7 @@ def test_read_public_source_returns_redacted_reason_code_on_query_failure(
value, health = asyncio.run(
_read_public_source(
project_id="awoooi",
limiter=asyncio.Semaphore(1),
source_id="audit_runtime",
statement="SELECT 1",
result_mode="one",
@@ -341,7 +342,7 @@ def test_service_uses_canonical_awoooi_project_scope(monkeypatch) -> None:
assert payload["summary"]["unavailable_source_count"] == 9
def test_service_reads_independent_sources_concurrently(monkeypatch) -> None:
def test_service_serializes_sources_for_single_connection_budget(monkeypatch) -> None:
service = IwoooSSecurityAssetControlPlaneService()
concurrency = {"active": 0, "maximum": 0}
@@ -376,7 +377,7 @@ def test_service_reads_independent_sources_concurrently(monkeypatch) -> None:
)
payload = asyncio.run(service._load_snapshot())
assert concurrency["maximum"] == 9
assert concurrency["maximum"] == 1
assert payload["summary"]["source_count"] == 9
assert payload["summary"]["ready_source_count"] == 9
assert payload["summary"]["unavailable_source_count"] == 0