From 29ac35b4e1619798acc68ab746cbf09b84e8c8b8 Mon Sep 17 00:00:00 2001 From: jvc56 Date: Fri, 24 Jan 2025 15:03:10 -0500 Subject: [PATCH] Make prod bugs test deterministic --- pkg/pair/cop/cop_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/pair/cop/cop_test.go b/pkg/pair/cop/cop_test.go index e02b458f0..7647e703e 100644 --- a/pkg/pair/cop/cop_test.go +++ b/pkg/pair/cop/cop_test.go @@ -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)) @@ -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) }