Skip to content

Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy

Rust

fix cancellation test startup assumptions

Raine Virtaaa715eb1e157
diff --git a/src/providers/codex/mod.rs b/src/providers/codex/mod.rs
index c09f930..450de58 100644
--- a/src/providers/codex/mod.rs
+++ b/src/providers/codex/mod.rs
@@ -2491,11 +2491,14 @@ mod tests {
emit_live_event(
&mut first_websocket,
&serde_json::json!({
- "type": "codex.rate_limits",
- "rate_limits": {
- "allowed": false,
- "limit_reached": true,
- "primary": {"reset_after_seconds": 0}
+ "type": "response.failed",
+ "response": {
+ "status": "failed",
+ "error": {
+ "status": 429,
+ "message": "rate limit exceeded",
+ "retry_after_seconds": 0
+ }
}
}),
)
diff --git a/tests/smoke_cutover.rs b/tests/smoke_cutover.rs
index 12f1622..d32aae1 100644
--- a/tests/smoke_cutover.rs
+++ b/tests/smoke_cutover.rs
@@ -2178,7 +2178,7 @@ async fn smoke_codex_http_cancels_retry_backoff_when_request_drops() {
"stream": true,
"messages": [{"role":"user","content":"hello"}]
})));
- tokio::time::timeout(Duration::from_millis(200), async {
+ tokio::time::timeout(Duration::from_secs(5), async {
while attempts.load(Ordering::SeqCst) == 0 {
tokio::task::yield_now().await;
}