{
  "id": "java/junit-test-execution-timeout",
  "signature": "org.junit.jupiter.api.extension.TestWatcher: testTimedOut - test timed out after 5000ms",
  "signature_zh": "测试超时：测试在 5000 毫秒后超时",
  "regex": "org\\.junit\\.jupiter\\.api\\.extension\\.TestWatcher:\\ testTimedOut\\ \\-\\ test\\ timed\\ out\\ after\\ 5000ms",
  "domain": "java",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Test method took longer than specified timeout due to infinite loops, blocking calls, or slow performance.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试方法执行时间超过指定的超时时间，原因可能是无限循环、阻塞调用或性能缓慢。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing timeout value without investigation",
      "why_fails": "May hide performance bugs or infinite loops.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing @Timeout annotation",
      "why_fails": "Test may run indefinitely in CI.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Debug with stack trace on timeout",
      "success_rate": 0.85,
      "how": "// Add @Timeout annotation and check thread dump on failure\n@Timeout(5)\n@Test\nvoid slowTest() {\n    // code\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use assertTimeout with preemptive flag",
      "success_rate": 0.9,
      "how": "assertTimeoutPreemptively(Duration.ofSeconds(5), () -> {\n    // test code\n});",
      "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.81,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}