"""供 PluginRunner 等测试使用的真实插件子类(非 unittest.mock)。""" from typing import List from app.core.plugin_system.base import BaseCrawlerPlugin from app.models.domain import ProxyRaw class UnhealthyPlugin(BaseCrawlerPlugin): """health_check 抛错,用于验证 Runner 对异常的统计与落库。""" name = "test_unhealthy_runner" display_name = "TestUnhealthy" description = "PluginRunner health_check failure test double" async def crawl(self) -> List[ProxyRaw]: return [] async def health_check(self) -> bool: raise RuntimeError("network down")