From 10b27fa978983d03ae5cd7edb69e0bad2445b3fe Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Fri, 14 Mar 2014 19:30:55 +0200 Subject: [PATCH] better test for random shared balance --- engine/sharedgroup_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/sharedgroup_test.go b/engine/sharedgroup_test.go index 292d7aaaa..95b532718 100644 --- a/engine/sharedgroup_test.go +++ b/engine/sharedgroup_test.go @@ -102,7 +102,11 @@ func TestSharedPopBalanceByStrategyRandomHigh(t *testing.T) { firstTest := (sbc[0].Uuid == x.Uuid) sbc = sg.GetBalancesByStrategy(bc[0], bc) secondTest := (sbc[0].Uuid == x.Uuid) - if firstTest && secondTest { + sbc = sg.GetBalancesByStrategy(bc[0], bc) + thirdTest := (sbc[0].Uuid == x.Uuid) + sbc = sg.GetBalancesByStrategy(bc[0], bc) + fourthTest := (sbc[0].Uuid == x.Uuid) + if firstTest && secondTest && thirdTest && fourthTest { t.Error("Something is wrong with balance randomizer") } }