Stabilize Bazel tests (timeout tweaks and flake fixes) (#17791)

This commit is contained in:
David de Regt
2026-04-16 07:57:51 -07:00
committed by GitHub
parent 895e2d056f
commit 6adba99f4d
34 changed files with 200 additions and 60 deletions
+9 -1
View File
@@ -233,6 +233,7 @@ async fn remove_legacy_db_files(
return;
}
};
let mut legacy_paths = Vec::new();
while let Ok(Some(entry)) = entries.next_entry().await {
if !entry
.file_type()
@@ -248,7 +249,14 @@ async fn remove_legacy_db_files(
continue;
}
let legacy_path = entry.path();
legacy_paths.push(entry.path());
}
// On Windows, SQLite can keep the main database file undeletable until the
// matching `-wal` / `-shm` sidecars are removed. Remove the longest
// sidecar-style paths first so the main file is attempted last.
legacy_paths.sort_by_key(|path| std::cmp::Reverse(path.as_os_str().len()));
for legacy_path in legacy_paths {
if let Err(err) = tokio::fs::remove_file(&legacy_path).await {
warn!(
"failed to remove legacy {db_label} db file {}: {err}",
+1
View File
@@ -729,6 +729,7 @@ mod tests {
.await
.expect("insert legacy log row");
pool.close().await;
drop(pool);
let runtime = StateRuntime::init(codex_home.clone(), "test-provider".to_string())
.await