aboutsummaryrefslogtreecommitdiff
path: root/internal/game/owner_regression_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/owner_regression_test.go')
-rw-r--r--internal/game/owner_regression_test.go14
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):
}
}