Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ansible/roles/test/files/ptftests/advanced-reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ def runTest(self):
no_routing_start = None
no_routing_stop = None
no_cp_replies = None
upper_replies = []
routing_always = False

arista_vms = self.test_params['arista_vms'][1:-1].split(",")
ssh_targets = []
Expand Down Expand Up @@ -590,14 +592,16 @@ def runTest(self):
self.log("Data plane was stopped, Waiting until it's up. Stop time: %s" % str(no_routing_start))
except TimeoutError:
self.log("Data plane never stop")
no_routing_start = datetime.datetime.min
routing_always = True
upper_replies = [self.nr_vl_pkts]

if no_routing_start is not None:
self.timeout(self.task_timeout, "DUT hasn't started to work for %d seconds" % self.task_timeout)
no_routing_stop, _ = self.check_forwarding_resume()
self.cancel_timeout()
else:
no_routing_stop = datetime.datetime.min
no_routing_start = datetime.datetime.min

# Stop watching DUT
self.watching = False
Expand Down Expand Up @@ -690,7 +694,8 @@ def runTest(self):

if no_routing_stop:
self.log("Downtime was %s" % str(no_routing_stop - no_routing_start))
self.log("Reboot time was %s" % str(no_routing_stop - self.reboot_start))
reboot_time = "0:00:00" if routing_always else str(no_routing_stop - self.reboot_start)
self.log("Reboot time was %s" % reboot_time)
self.log("Expected downtime is less then %s" % self.limit)

if self.reboot_type == 'fast-reboot' and no_cp_replies:
Expand Down