experiments: Restart pings for CSU after recovery
refs: #3086
Change-Id: I54fe2a2d1b4b6cd4d09ff72b79fbb30de50d5a89
diff --git a/ndn/experiments/failure_experiment.py b/ndn/experiments/failure_experiment.py
index 22018aa..3f34789 100644
--- a/ndn/experiments/failure_experiment.py
+++ b/ndn/experiments/failure_experiment.py
@@ -33,7 +33,7 @@
Experiment.__init__(self, args)
self.PING_COLLECTION_TIME_BEFORE_FAILURE = 60
- self.PING_COLLECTION_TIME_AFTER_RECOVERY = 90
+ self.PING_COLLECTION_TIME_AFTER_RECOVERY = 120
def run(self):
self.startPings()
@@ -60,6 +60,10 @@
host.nfd.setStrategy("/ndn/edu", self.strategy)
host.cmd("ndnpingserver /ndn/edu/" + str(host) + " > ping-server &")
+ for other in self.net.hosts:
+ if host.name != other.name:
+ self.ping(host, other, self.PING_COLLECTION_TIME_AFTER_RECOVERY)
+
# Collect pings for more seconds after CSU is up
time.sleep(self.PING_COLLECTION_TIME_AFTER_RECOVERY)