test: add deadlock regression test for JSONHandler (issue #3) #7

Sloučený
sneak sloučil 1 commity z větve :test/jsonhandler-deadlock do větve main před 2026-02-08 18:27:15 +01:00
Spolupracovník

Adds a test that reproduces the deadlock described in #3.

The test spawns a goroutine that calls slog.Info() with JSONHandler set as the default handler, then waits 5 seconds for completion. On unfixed code this deadlocks; with the fix from #4 it passes.

This can be merged independently or after #4.

Adds a test that reproduces the deadlock described in #3. The test spawns a goroutine that calls `slog.Info()` with `JSONHandler` set as the default handler, then waits 5 seconds for completion. On unfixed code this deadlocks; with the fix from #4 it passes. This can be merged independently or after #4.
sneak byl přiřazen clawbot 2026-02-08 18:21:21 +01:00
clawbot přidal/a 1 commit 2026-02-08 18:21:22 +01:00
Reproduces issue #3 — JSONHandler.Handle() calling log.Println() causes
a deadlock when slog.SetDefault redirects log output back through slog.

This test hangs/fails on main and should pass once #4 is merged.
sneak sloučený commit 1eef38a5fa do main 2026-02-08 18:27:15 +01:00
sneak odstranil/a větev test/jsonhandler-deadlock 2026-02-08 18:27:15 +01:00
Přihlaste se pro zapojení do konverzace.
Žádní posuzovatelé
1 účastníků
Oznámení
Termín dokončení
Žádný termín dokončení.
Závislosti

Nejsou nastaveny žádné závislosti.

Reference: sneak/simplelog#7