Skip to content

Commit a2fb714

Browse files
georgeh0claude
andauthored
test(rust-sdk): loosen nested-scope liveness timeout to avoid Windows CI flake (#2093)
max_inflight_components_allows_nested_scope_with_single_permit is a pure liveness check: with a single permit, nested scopes must not deadlock. The tokio::time::timeout only exists to convert a genuine deadlock-hang into a failure instead of hanging the test binary. The 8 nested components each commit LMDB write txns with fsync, serialized through the single-writer batcher. fsync is slow on Windows CI under load, and the 3s bound was flaking (Elapsed) there while passing everywhere else. No engine or test-logic changed between the last green run and the failure, and a real deadlock would hang 100% of the time on Windows rather than intermittently — so this is timing, not a logic bug. Raise the bound to 60s. A real deadlock never makes progress, so the generous timeout still catches it. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1eec316 commit a2fb714

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

rust/sdk/cocoindex/tests/pipeline.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,14 @@ async fn max_inflight_components_limits_mount_each_concurrency() {
22302230
async fn max_inflight_components_allows_nested_scope_with_single_permit() {
22312231
let (app, _dir) = temp_app_with_max_inflight("nested_scope_max_inflight_one", 1).await;
22322232

2233-
tokio::time::timeout(Duration::from_secs(3), async {
2233+
// This is a liveness check: with a single permit, nested scopes must not
2234+
// deadlock (the parent releases its permit before a child acquires one).
2235+
// The timeout only exists to turn a genuine deadlock-hang into a failure
2236+
// instead of hanging the whole test binary — a real deadlock never makes
2237+
// progress, so a generous bound still catches it. Keep it generous: the 8
2238+
// nested components each commit LMDB write txns with fsync, which is slow on
2239+
// Windows CI under load and was flaking a tighter 3s bound (issue: Elapsed).
2240+
tokio::time::timeout(Duration::from_secs(60), async {
22342241
app.update(|ctx| async move {
22352242
for i in 0..4 {
22362243
let key = format!("child-{i}");

0 commit comments

Comments
 (0)