{
  "id": "python/pytest-timeout-test-hung",
  "signature": "TimeoutError: Test timed out after 30.0 seconds",
  "signature_zh": "TimeoutError: 测试在 30.0 秒后超时",
  "regex": "TimeoutError:\\ Test\\ timed\\ out\\ after\\ 30\\.0\\ seconds",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A test is stuck in an infinite loop, waiting on a resource, or performing a very slow operation that exceeds the timeout limit.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试陷入无限循环、等待资源或执行非常慢的操作，超过了超时限制。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only masks the problem; the test may eventually fail or consume excessive resources.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Without a timeout, the test suite can hang indefinitely, blocking CI pipelines.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Add debug prints in the test to identify where it hangs, then fix the infinite loop or blocking call.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Use a shorter timeout and mock external dependencies to avoid real network calls: `@pytest.mark.timeout(5)`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}