MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_set_retry

Function test_set_retry

crates/opencode-session/src/status.rs:185–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183
184 #[tokio::test]
185 async fn test_set_retry() {
186 let mgr = SessionStatusManager::new();
187 mgr.set_retry("ses_123", 2, "Rate limited".to_string(), 1700000000000)
188 .await;
189 let status = mgr.get("ses_123").await;
190 match status {
191 SessionStatusInfo::Retry {
192 attempt,
193 message,
194 next,
195 } => {
196 assert_eq!(attempt, 2);
197 assert_eq!(message, "Rate limited");
198 assert_eq!(next, 1700000000000);
199 }
200 _ => panic!("Expected Retry status"),
201 }
202 assert!(mgr.is_busy("ses_123").await);
203 }
204
205 #[tokio::test]
206 async fn test_list() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
set_retryMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected