From 0daed04c07688cc1af4faf752e0976310e69c84e Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 13 Aug 2020 14:00:55 +0200 Subject: [PATCH] Don't run the test 50 times Signed-off-by: Jakub Sztandera --- chain/messagepool/selection_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chain/messagepool/selection_test.go b/chain/messagepool/selection_test.go index 8843cfe61..0d82c09d8 100644 --- a/chain/messagepool/selection_test.go +++ b/chain/messagepool/selection_test.go @@ -926,7 +926,8 @@ func testCompetitiveMessageSelection(t *testing.T, rng *rand.Rand) (float64, flo capacityBoost := 0.0 rewardBoost := 0.0 - for i := 0; i < 50; i++ { + const runs = 1 + for i := 0; i < runs; i++ { // 2. optimal selection minersRand := rng.Float64() winerProba := noWinnersProb() @@ -982,8 +983,8 @@ func testCompetitiveMessageSelection(t *testing.T, rng *rand.Rand) (float64, flo } - capacityBoost /= 50 - rewardBoost /= 50 + capacityBoost /= runs + rewardBoost /= runs t.Logf("Average capacity boost: %f", capacityBoost) t.Logf("Average reward boost: %f", rewardBoost)