JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
test(mcp): 固定 sync 测试的 schema 缓存开关(!9045 CR-3)
huxiaokaie13955d1f006
diff --git a/tests/unit_tests/agentserver/test_sync_agents_configs.py b/tests/unit_tests/agentserver/test_sync_agents_configs.pyindex 8f53727847..edb2021368 100644--- a/tests/unit_tests/agentserver/test_sync_agents_configs.py+++ b/tests/unit_tests/agentserver/test_sync_agents_configs.py@@ -1,4 +1,4 @@-# Copyright (c) Huawei Technologies Co., Ltd. 2026. All rights reserved.+# Copyright (c) Huawei Technologies Co., Ltd. 2026. All rights reserved."""Unit tests for sync_agents_configs catalog apply + env ns isolation."""@@ -1013,7 +1013,7 @@ class TestOfficeclawGuard:assert TenantAgentPool.require_officeclaw_agent(req) is None@pytest.mark.asyncio-async def test_sync_revision_change_keeps_schema_cache(mock_warmup, tmp_path):+async def test_sync_revision_change_keeps_schema_cache(mock_warmup, tmp_path, monkeypatch):"""Catalog revision churn must not wipe the OfficeClaw MCP schema cache.Regression for the belt-and-suspenders invalidation previously wired into@@ -1025,6 +1025,10 @@ async def test_sync_revision_change_keeps_schema_cache(mock_warmup, tmp_path):"""from jiuwenswarm.common import mcp_config+ # CR-3: 固定缓存开关,与 test_mcp_schema_cache.py 的 fixture 一致,+ # 避免执行环境导出禁用值(0/false/no/off)时缓存旁路导致断言漂移+ monkeypatch.setenv("JIUWENSWARM_MCP_SCHEMA_CACHE", "1")+dist = tmp_path / "dist"dist.mkdir()(dist / "index.js").write_text("shell v1")