Skip to content

Commit d9c60d7

Browse files
lf_interop_throughput.py: Added max attempt at checking CXs
Added max_retries to cx states loop to avoid infinite checking if error occurs. Verified with: ./lf_interop_throughput.py --mgr 192.168.91.50 --mgr_port 8080 --ssid Quincefruit --passwd lanforge --security wpa2 --upstream_port 1.050.01 --traffic_type lf_udp --download 100000000 --test_duration 1m --packet_size 1500 --incremental_capacity 1 --precleanup --postcleanup Signed-off-by: Cameron LaPlante <[email protected]>
1 parent b0ea13f commit d9c60d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

py-scripts/lf_interop_throughput.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,10 @@ def monitor(self, iteration, individual_df, device_names, incremental_capacity_l
655655
logger.info("Waiting for cx to start")
656656

657657
# loop to get_cx_states until one return 'Running'
658+
max_retries = 20
658659
cx_states_down = True
659660
while cx_states_down:
661+
max_retries -= 1
660662
states = self.get_cx_states(list(self.cx_profile.created_cx.keys()))
661663
logger.info("states: {}".format(states))
662664

@@ -665,6 +667,10 @@ def monitor(self, iteration, individual_df, device_names, incremental_capacity_l
665667
cx_states_down = False
666668
time.sleep(2)
667669

670+
if max_retries == 0:
671+
logger.error("CXs are not coming up. Exiting the test")
672+
exit(1)
673+
668674
start_time = datetime.now()
669675
logger.info("Monitoring cx and endpoints")
670676
end_time = start_time + timedelta(seconds=int(self.test_duration))

0 commit comments

Comments
 (0)