mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 19:03:43 +00:00
fix(multiplayer): repair allocated compose verification
This commit is contained in:
@@ -778,6 +778,12 @@ func TestPostgreSQLProposalClaimAndResponseAreAtomic(t *testing.T) {
|
||||
if accepted.State != domain.Accepted || accepted.Revision != 2 {
|
||||
t.Fatalf("proposal did not close after unanimous acceptance: %+v", accepted)
|
||||
}
|
||||
// The API's post-commit recovery promoter must accept the nullable casual
|
||||
// arena path left by the atomic response transaction and converge on the
|
||||
// already-created match.
|
||||
if err := PromoteStoredAcceptedProposal(ctx, db, proposal.ProposalID, now.Add(time.Second)); err != nil {
|
||||
t.Fatalf("replay persisted casual promotion: %v", err)
|
||||
}
|
||||
var matchState string
|
||||
if err := db.QueryRow(`SELECT state FROM matches WHERE match_id = 'match-proposal-integration'`).Scan(&matchState); err != nil {
|
||||
t.Fatalf("atomic accepted match: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user