Skip to content

Commit b263a89

Browse files
fylornclaude
andauthored
Test: leave the slot-wait case room under a busy runner (#345)
waiting_for_a_slot_is_not_counted_as_silence had the upstream answer 600 ms into a 1 s idle window and timed out once on a loaded macOS runner. The 1.5 s slot wait alone exceeds the window, so the regression it guards is caught at any answer delay; 200 ms leaves the margin. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 25aa2b6 commit b263a89

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎crates/tw-gateway/tests/idle_timeout.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,11 @@ async fn content_then_silence_ends_with_an_error_the_client_understands() {
781781

782782
#[tokio::test]
783783
async fn waiting_for_a_slot_is_not_counted_as_silence() {
784-
// 唯一的一家满着:等了 1.5 秒才空出来,之后 600 毫秒出内容。等的那段不算,照常答上
784+
// 唯一的一家满着:等了 1.5 秒才空出来,之后 200 毫秒出内容。等的那段不算,照常答上。
785+
// 等的比窗口(1 秒)长,算进去就必然超时;出内容那一段离窗口要留足余量 —— 600 毫秒时
786+
// 在忙的 CI 机器上撞过一次超时
785787
let late = upstream(Script {
786-
steps: vec![(0, MESSAGE_START), (600, answer("patience"))],
788+
steps: vec![(0, MESSAGE_START), (200, answer("patience"))],
787789
..Default::default()
788790
})
789791
.await;

0 commit comments

Comments
 (0)