MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_is_recoverable

Function test_is_recoverable

atomic-agent/src/error.rs:557–587  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected