diff --git a/ansible/roles/test/files/acstests/py3/lag_test.py b/ansible/roles/test/files/acstests/py3/lag_test.py index 61cc1e4366f..3786bf30e7d 100644 --- a/ansible/roles/test/files/acstests/py3/lag_test.py +++ b/ansible/roles/test/files/acstests/py3/lag_test.py @@ -117,7 +117,7 @@ def getMedianInterval(self, masked_exp_pkt): # Get the median intervals.sort() - current_pkt_timing = intervals[self.interval_count / 2] + current_pkt_timing = intervals[int(self.interval_count / 2)] return current_pkt_timing def runTest(self): diff --git a/tests/pc/test_lag_2.py b/tests/pc/test_lag_2.py index 6dcc400e9a2..943d79afbbd 100644 --- a/tests/pc/test_lag_2.py +++ b/tests/pc/test_lag_2.py @@ -116,7 +116,8 @@ def __verify_lag_lacp_timing(self, lacp_timer, exp_iface): 'ether_type': 0x8809, 'interval_count': 3 } - ptf_runner(self.ptfhost, 'acstests', "lag_test.LacpTimingTest", '/root/ptftests', params=params) + ptf_runner(self.ptfhost, 'acstests', "lag_test.LacpTimingTest", + '/root/ptftests', params=params, is_python3=True) def __verify_lag_minlink(self, host, lag_name, lag_facts, neighbor_intf, deselect_time, wait_timeout=30):