mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-11-07 08:55:37 +08:00
test(windows): backport server test repairs from #4862
Reduce the SQLite concurrency fixture to five iterations per writer on
Windows so slow fsync does not exhaust the busy timeout. Hold mutation
stress-test locks until a wall-clock deadline rather than depending on
Windows timer granularity.
Retain Windows' existing portable supervisor fixtures. The isolation
validation modules changed by #4862 are not present on this branch.
Native Windows ARM64 validation: 6630 tests passed, 41 skipped, 0 failed.
Backported from commit 92434dcb2b.
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
This commit is contained in:
@@ -1164,7 +1164,11 @@ mod tests {
|
||||
if op.is_distributed() {
|
||||
fleet.enter(op);
|
||||
}
|
||||
tokio::time::sleep(hold).await;
|
||||
// Windows timers round a 1 ms sleep up to ~16 ms, so yield instead.
|
||||
let until = std::time::Instant::now() + hold;
|
||||
while std::time::Instant::now() < until {
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
if op.is_distributed() {
|
||||
fleet.leave(op);
|
||||
}
|
||||
|
||||
@@ -2298,7 +2298,8 @@ async fn sqlite_concurrent_writes_return_their_own_resource_version() {
|
||||
use std::sync::Arc;
|
||||
|
||||
const WRITERS: u64 = 8;
|
||||
const WRITES: u64 = 25;
|
||||
// Slow Windows fsync can starve a writer past the SQLite busy timeout.
|
||||
const WRITES: u64 = if cfg!(windows) { 5 } else { 25 };
|
||||
|
||||
let tmp = tempfile::tempdir().expect("tempdir");
|
||||
let url = on_disk_store_url(&tmp.path().join("openshell.db"));
|
||||
|
||||
Reference in New Issue
Block a user