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

Function test_is_recoverable

atomic-core/src/crdt/apply/error.rs:916–933  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

914
915 #[test]
916 fn test_is_recoverable() {
917 let trunk_id = TrunkId::new(NodeId::new(1), 0);
918
919 // Not found errors are recoverable (might need to apply deps first)
920 assert!(ApplyError::trunk_not_found(trunk_id).is_recoverable());
921
922 // Already exists errors are recoverable (might be idempotent)
923 assert!(ApplyError::trunk_already_exists(trunk_id).is_recoverable());
924
925 // Invalid state errors are recoverable (might need state change)
926 assert!(ApplyError::invalid_trunk_state(trunk_id, "deleted", "delete").is_recoverable());
927
928 // Ordering errors are not recoverable
929 assert!(!ApplyError::circular_reference("test").is_recoverable());
930
931 // Internal errors are not recoverable
932 assert!(!ApplyError::internal("bug").is_recoverable());
933 }
934
935 #[test]
936 fn test_classification_mutual_exclusion() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected