From 3b430b906317d4114e5ebe3e35bdd0ac430a463a Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 5 Feb 2017 14:46:42 +0200 Subject: test breakage on csi-trex-06 Signed-off-by: imarom --- .../regression/stateless_tests/stl_capture_test.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts/automation/regression/stateless_tests') diff --git a/scripts/automation/regression/stateless_tests/stl_capture_test.py b/scripts/automation/regression/stateless_tests/stl_capture_test.py index 6c4824b8..93e0081f 100644 --- a/scripts/automation/regression/stateless_tests/stl_capture_test.py +++ b/scripts/automation/regression/stateless_tests/stl_capture_test.py @@ -124,7 +124,6 @@ class STLCapture_Test(CStlGeneral_Test): self.c.add_streams(ports = self.tx_port, streams = [stream]) self.c.start(ports = self.tx_port, force = True) - captures = [{'capture_id': None, 'limit': 50}, {'capture_id': None, 'limit': 80}, {'capture_id': None, 'limit': 100}] for i in range(0, 100): @@ -133,7 +132,17 @@ class STLCapture_Test(CStlGeneral_Test): capture['capture_id'] = self.c.start_capture(rx_ports = [self.rx_port], limit = capture['limit'])['id'] # a little time to wait for captures to be full - server_captures = self.c.get_capture_status() + wait_iterations = 0 + while True: + server_captures = self.c.get_capture_status() + counts = ([c['count'] for c in server_captures.values()]) + if {50, 80, 100} == set(counts): + break + + time.sleep(0.1) + wait_iterations += 1 + assert(wait_iterations <= 5) + for capture in captures: capture_id = capture['capture_id'] -- cgit