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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user