test(verifier): widen weighted-selection assertion to a 5x skew margin

This commit is contained in:
pj committed 2026-06-06 13:02:38 +05:30
1 parent 445a33daff
commit 58afecd7b7
1 file changed
+5 -2
+5 -2
View File
@@ -339,8 +339,11 @@ func TestNextAction_WeightedSelectsByWeight(t *testing.T) {
awayCount++
}
}
if awayCount <= homeCount {
t.Errorf("expected away-skewed distribution, got home=%d away=%d", homeCount, awayCount)
// Weights are 99:1, so away must dominate by a wide margin. Requiring a 5x
// skew (rather than a bare >) keeps the assertion robust to harmless picker
// reshuffles while still failing if the weight is ignored or inverted.
if awayCount <= 5*homeCount {
t.Errorf("expected away to outweigh home by >5x (weights 99:1), got home=%d away=%d", homeCount, awayCount)
}
}