diff --git a/cmd/bd/daemon_autoimport_test.go b/cmd/bd/daemon_autoimport_test.go index 6348b439..36e0a8e4 100644 --- a/cmd/bd/daemon_autoimport_test.go +++ b/cmd/bd/daemon_autoimport_test.go @@ -134,11 +134,11 @@ func TestDaemonAutoImportAfterGitPull(t *testing.T) { // Wait for filesystem to settle after git operations // Windows has lower filesystem timestamp precision (typically 100ms) - // so we need a longer delay to ensure mtime comparison works + // and file I/O may be slower, so we need a longer delay if runtime.GOOS == "windows" { - time.Sleep(200 * time.Millisecond) + time.Sleep(500 * time.Millisecond) } else { - time.Sleep(50 * time.Millisecond) + time.Sleep(100 * time.Millisecond) } // Start daemon server in clone2 diff --git a/cmd/bd/daemon_sync_branch_test.go b/cmd/bd/daemon_sync_branch_test.go index 0a886c7f..2c87931b 100644 --- a/cmd/bd/daemon_sync_branch_test.go +++ b/cmd/bd/daemon_sync_branch_test.go @@ -563,9 +563,10 @@ func TestSyncBranchPull_Success(t *testing.T) { t.Error("JSONL not copied to main repo after pull") } - // On Windows, file I/O may need time to settle + // On Windows, file I/O may need more time to settle + // Increase delay significantly for reliable CI tests if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) + time.Sleep(300 * time.Millisecond) } // Verify JSONL content matches