better test for random shared balance

This commit is contained in:
Radu Ioan Fericean
2014-03-14 19:30:55 +02:00
parent e2a50a77fd
commit 10b27fa978

View File

@@ -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")
}
}