diff options
| author | historia <[not public]> | 2026-09-16 13:52:58 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-16 13:52:58 -0400 |
| commit | c054b27f628f23fecc505b9e09e78721738f3c4e (patch) | |
| tree | ea197165bc454ee811dd22b9ceef5dc94bb0b279 /internal/game/owner_regression_test.go | |
| parent | f2d44f10f52d3fe68fdb19b518a330f7af9e1ed2 (diff) | |
| download | thehouseoficarus-c054b27f628f23fecc505b9e09e78721738f3c4e.tar.gz | |
fix: shutdown admission, recovery identity/order, rollback journal retention, pickup merge
Diffstat (limited to 'internal/game/owner_regression_test.go')
| -rw-r--r-- | internal/game/owner_regression_test.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/internal/game/owner_regression_test.go b/internal/game/owner_regression_test.go index 1ccd25f..3ba4bd4 100644 --- a/internal/game/owner_regression_test.go +++ b/internal/game/owner_regression_test.go @@ -52,17 +52,19 @@ func TestFullOwnerQueueAppliesBackpressure(t *testing.T) { } } -// TestStoppedOwnerRunsStragglersInline: after the owner stops (graceful -// shutdown), straggler submissions execute inline rather than blocking -// forever — the documented admissions-closed behavior. -func TestStoppedOwnerRunsStragglersInline(t *testing.T) { +// TestStoppedOwnerDropsStragglers: after the owner stops (graceful +// shutdown), straggler submissions are dropped, never executed inline on the +// caller's goroutine (which would mutate live state concurrently with the +// shutdown sequence and after the final-save barrier) and never block +// forever. +func TestStoppedOwnerDropsStragglers(t *testing.T) { g := &Game{owner: newOwner()} g.stopOwner() ran := make(chan struct{}) go g.run(func() { close(ran) }) select { case <-ran: - case <-time.After(5 * time.Second): - t.Fatal("straggler task blocked forever after the owner stopped") + t.Fatal("straggler task executed after the owner stopped; it must be dropped") + case <-time.After(100 * time.Millisecond): } } |
