fix(multiplayer): dispatch live abandonment lifecycle

This commit is contained in:
Josh Creek
2026-09-03 20:55:56 +01:00
parent bd93a2657e
commit 947fefc95c
5 changed files with 62 additions and 5 deletions
+1 -1
View File
@@ -689,7 +689,7 @@ func TestPostgreSQLLiveReconnectGraceExpiryPersistsAbandonmentWithoutReleasingRe
t.Fatalf("penalty ends=%v err=%v", endsAt, err)
}
var outboxCount, revision int
if err := db.QueryRowContext(ctx, `SELECT count(*) FROM outbox WHERE aggregate_id = 'live-abandon-match' AND event_type = 'participant_abandoned'`).Scan(&outboxCount); err != nil || outboxCount != 1 {
if err := db.QueryRowContext(ctx, `SELECT count(*) FROM outbox WHERE aggregate_id = 'live-abandon-match' AND event_type = 'state_changed'`).Scan(&outboxCount); err != nil || outboxCount != 1 {
t.Fatalf("outbox=%d err=%v", outboxCount, err)
}
if err := db.QueryRowContext(ctx, `SELECT revision FROM matches WHERE match_id = 'live-abandon-match'`).Scan(&revision); err != nil || revision != 1 {