Optimize test suite performance (15-18x speedup)

- Add t.Parallel() to CLI and export/import tests for concurrent execution
- Remove unnecessary 200ms sleep in daemon_autoimport_test (Execute forces sync)
- Reduce filesystem settle wait from 100ms to 50ms on non-Windows
- Optimize debouncer test sleeps (9 reductions, 30-50% faster)

Results:
- cmd/bd: 5+ minutes → 18 seconds
- internal/importer: < 1 second
- Most packages: < 2 seconds

Closes bd-gpe7
This commit is contained in:
Steve Yegge
2025-11-05 10:26:58 -08:00
parent 32849c727a
commit 0fc4da7358
4 changed files with 31 additions and 16 deletions

View File

@@ -138,7 +138,7 @@ func TestDaemonAutoImportAfterGitPull(t *testing.T) {
if runtime.GOOS == "windows" {
time.Sleep(500 * time.Millisecond)
} else {
time.Sleep(100 * time.Millisecond)
time.Sleep(50 * time.Millisecond)
}
// Start daemon server in clone2
@@ -232,10 +232,8 @@ func TestDaemonAutoImportAfterGitPull(t *testing.T) {
// Agent B pulls
runGitCmd(t, clone2Dir, "pull")
// Wait a bit for auto-import to process
time.Sleep(200 * time.Millisecond)
// Query via daemon - should see priority 0
// (Execute forces auto-import synchronously)
socketPath := filepath.Join(clone2BeadsDir, "bd.sock")
client, err := rpc.TryConnect(socketPath)
if err != nil {