Refactor HAminorityRestart
- Split into two tests, one that kills ONOS and one that stops the
service
- Check ONOS between brining some ONOS nodes down and up
- Set "gossip" time to be a function of # of nodes
Change-Id: I389164c8225b2e496db433552a7ba5a5a3e5c2bb
diff --git a/TestON/tests/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HAclusterRestart/HAclusterRestart.py
index 3e81d3e..1169a7d 100644
--- a/TestON/tests/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HAclusterRestart/HAclusterRestart.py
@@ -752,14 +752,16 @@
append = True
else:
count += 1
- # FIXME: make this time configurable/calculate based off of number of
- # nodes and gossip rounds
+ gossipPeriod = int( main.params['timers']['gossip'] )
+ maxGossipTime = gossipPeriod * len( main.nodes )
utilities.assert_greater_equals(
- expect=40, actual=gossipTime,
+ expect=maxGossipTime, actual=gossipTime,
onpass="ECM anti-entropy for intents worked within " +
"expected time",
- onfail="Intent ECM anti-entropy took too long" )
- if gossipTime <= 40:
+ onfail="Intent ECM anti-entropy took too long. " +
+ "Expected time:{}, Actual time:{}".format( maxGossipTime,
+ gossipTime ) )
+ if gossipTime <= maxGossipTime:
intentAddResult = True
if not intentAddResult or "key" in pendingMap: