diff --git a/ansible/roles/test/files/ptftests/advanced-reboot.py b/ansible/roles/test/files/ptftests/advanced-reboot.py index b8be0e89642..f6828d12968 100644 --- a/ansible/roles/test/files/ptftests/advanced-reboot.py +++ b/ansible/roles/test/files/ptftests/advanced-reboot.py @@ -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 = [] @@ -590,7 +592,8 @@ 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) @@ -598,6 +601,7 @@ def runTest(self): self.cancel_timeout() else: no_routing_stop = datetime.datetime.min + no_routing_start = datetime.datetime.min # Stop watching DUT self.watching = False @@ -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: