fix: resolve CI test failures on Linux and Windows

- Fix TestMigrateCommand: Use correct sqlite3 driver name and file URI format
- Fix TestDaemonAutoImportAfterGitPull: Add Windows-specific delay for filesystem timestamp precision
- Fix TestSyncBranchPull_Success: Add Windows-specific delay for file I/O settling

Amp-Thread-ID: https://ampcode.com/threads/T-5abd1f2f-9607-4111-af9d-19df64362ac7
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-11-04 10:02:08 -08:00
parent de1fb5ff85
commit 859fbd4976
3 changed files with 27 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import (
"encoding/json"
"os"
"path/filepath"
"runtime"
"testing"
"time"
@@ -132,7 +133,13 @@ func TestDaemonAutoImportAfterGitPull(t *testing.T) {
runGitCmd(t, clone2Dir, "pull")
// Wait for filesystem to settle after git operations
time.Sleep(50 * time.Millisecond)
// Windows has lower filesystem timestamp precision (typically 100ms)
// so we need a longer delay to ensure mtime comparison works
if runtime.GOOS == "windows" {
time.Sleep(200 * time.Millisecond)
} else {
time.Sleep(50 * time.Millisecond)
}
// Start daemon server in clone2
socketPath := filepath.Join(clone2BeadsDir, "bd.sock")