Skip to content

Commit

Permalink
Make prod bugs test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
jvc56 committed Jan 24, 2025
1 parent 380cd6f commit 29ac35b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/pair/cop/cop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ func TestCOPProdBugs(t *testing.T) {

// Test players prepaired with byes
req := pairtestutils.CreateAlbanyAfterRound16PairRequest()
req.Seed = 1
resp := cop.COPPair(ctx, req)
is.Equal(resp.ErrorCode, pb.PairError_SUCCESS)
is.Equal(resp.Pairings[0], int32(22))
Expand All @@ -749,16 +750,19 @@ func TestCOPProdBugs(t *testing.T) {

// Test that back-to-back pairings are penalized correctly
req = pairtestutils.CreateAlbanyCSWNewYearsAfterRound27PairRequest()
req.Seed = 1
resp = cop.COPPair(ctx, req)
is.Equal(resp.ErrorCode, pb.PairError_SUCCESS)

// There are pairings for all rounds, but the last round is only partially
// paired, so this should finish successfully
req = pairtestutils.CreateAlbanyCSWNewYearsAfterRound27LastRoundPartiallyPairedPairRequest()
req.Seed = 1
resp = cop.COPPair(ctx, req)
is.Equal(resp.ErrorCode, pb.PairError_SUCCESS)

req = pairtestutils.CreateAlbanyCSWNewYearsRound25PartiallyPairedPairRequest()
req.Seed = 1
resp = cop.COPPair(ctx, req)
is.Equal(resp.ErrorCode, pb.PairError_SUCCESS)
}
Expand Down

0 comments on commit 29ac35b

Please sign in to comment.