()
| 555 | |
| 556 | #[test] |
| 557 | fn test_is_recoverable() { |
| 558 | assert!(AgentError::WatchmanNotRunning.is_recoverable()); |
| 559 | assert!(AgentError::WatchmanConnectionFailed { |
| 560 | reason: "timeout".to_string() |
| 561 | } |
| 562 | .is_recoverable()); |
| 563 | assert!(AgentError::WatchmanQueryFailed { |
| 564 | reason: "stale".to_string() |
| 565 | } |
| 566 | .is_recoverable()); |
| 567 | assert!(AgentError::CaptureInvalid { |
| 568 | reason: "tampered".to_string(), |
| 569 | } |
| 570 | .is_recoverable()); |
| 571 | assert!(AgentError::TurnAlreadyActive { |
| 572 | session_id: "s".to_string(), |
| 573 | } |
| 574 | .is_recoverable()); |
| 575 | |
| 576 | // Not recoverable |
| 577 | assert!(!AgentError::SessionNotFound { |
| 578 | session_id: "s".to_string() |
| 579 | } |
| 580 | .is_recoverable()); |
| 581 | assert!(!AgentError::RecordFailed { |
| 582 | session_id: "s".to_string(), |
| 583 | turn_number: 1, |
| 584 | reason: "fail".to_string(), |
| 585 | } |
| 586 | .is_recoverable()); |
| 587 | } |
| 588 | |
| 589 | #[test] |
| 590 | fn test_is_watchman_unavailable() { |
nothing calls this directly
no outgoing calls
no test coverage detected