test breakage on csi-trex-06 96/5296/1
authorimarom <[email protected]>
Sun, 5 Feb 2017 12:46:42 +0000 (14:46 +0200)
committerimarom <[email protected]>
Sun, 5 Feb 2017 12:47:51 +0000 (14:47 +0200)
Signed-off-by: imarom <[email protected]>
scripts/automation/regression/stateless_tests/stl_capture_test.py
scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py

index 6c4824b..93e0081 100644 (file)
@@ -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']
index edffc5d..492dba6 100755 (executable)
@@ -1395,7 +1395,7 @@ class STLClient(object):
     def get_service_enabled_ports(self):
         return [port_id
                 for port_id, port_obj in self.ports.items()
-                if port_obj.is_acquired() and port_obj.is_service_mode_on()]
+                if port_obj.is_service_mode_on()]
 
         
     # get paused ports