fix: increase Windows filesystem delays in flaky tests

- TestDaemonAutoImportAfterGitPull: 200ms -> 500ms for filesystem timestamp precision
- TestSyncBranchPull_Success: 100ms -> 300ms for file I/O settling
- Also increase Linux delays slightly for more reliability
This commit is contained in:
Steve Yegge
2025-11-04 10:20:12 -08:00
parent 859fbd4976
commit 94e71642f9
2 changed files with 6 additions and 5 deletions

View File

@@ -134,11 +134,11 @@ func TestDaemonAutoImportAfterGitPull(t *testing.T) {
// Wait for filesystem to settle after git operations // Wait for filesystem to settle after git operations
// Windows has lower filesystem timestamp precision (typically 100ms) // 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" { if runtime.GOOS == "windows" {
time.Sleep(200 * time.Millisecond) time.Sleep(500 * time.Millisecond)
} else { } else {
time.Sleep(50 * time.Millisecond) time.Sleep(100 * time.Millisecond)
} }
// Start daemon server in clone2 // Start daemon server in clone2

View File

@@ -563,9 +563,10 @@ func TestSyncBranchPull_Success(t *testing.T) {
t.Error("JSONL not copied to main repo after pull") 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" { if runtime.GOOS == "windows" {
time.Sleep(100 * time.Millisecond) time.Sleep(300 * time.Millisecond)
} }
// Verify JSONL content matches // Verify JSONL content matches