Skip to content

Commit 3504913

Browse files
committed
test: Add comprehensive debug logging to TestQueryLimit
Adding t.Log statements throughout TestQueryLimit to track: - Config file path - Daemon socket path - Query socket path - Edit send progress - Full query response This will help diagnose why CI gets 0 edits while local gets 10.
1 parent 4a7a594 commit 3504913

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/e2e/config_e2e_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ max_limit = 50
264264
t.Fatalf("Failed to write config: %v", err)
265265
}
266266

267+
t.Logf("Starting daemon with config: %s", configPath)
268+
267269
// Start daemon
268270
cmd := exec.Command("../../bin/claude-mon", "daemon", "start", "--config", configPath)
269271
if err := cmd.Start(); err != nil {
@@ -274,7 +276,12 @@ max_limit = 50
274276
// Give daemon extra time to fully initialize in CI
275277
time.Sleep(3 * time.Second)
276278

277-
// Send multiple edit events
279+
// Check if daemon process is still running
280+
if err := cmd.Process.Signal(os.Signal(nil)); err != nil {
281+
t.Logf("Daemon process check: %v", err)
282+
}
283+
284+
t.Logf("Sending 20 edit events to daemon socket: %s", daemonSocket)
278285
for i := 0; i < 20; i++ {
279286
editPayload := map[string]interface{}{
280287
"type": "edit",
@@ -305,10 +312,14 @@ max_limit = 50
305312
time.Sleep(10 * time.Millisecond)
306313
}
307314

315+
t.Logf("Sent 20 edit events, waiting for processing")
316+
308317
// Wait for all edits to be processed
309318
// Use longer delay for CI environments which may be slower
310319
time.Sleep(3 * time.Second)
311320

321+
t.Logf("Querying daemon socket: %s", querySocket)
322+
312323
// Query without limit (should use default from config)
313324
queryPayload := map[string]interface{}{
314325
"type": "recent",

0 commit comments

Comments
 (0)