summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-02-05 14:46:42 +0200
committerimarom <imarom@cisco.com>2017-02-05 14:47:51 +0200
commit3b430b906317d4114e5ebe3e35bdd0ac430a463a (patch)
treece47b720132acf6c323962c05d751b51925e361d /scripts/automation
parent78c0502f5935ae575d0d89d201c1de83afd05fae (diff)
test breakage on csi-trex-06
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_capture_test.py13
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py2
2 files changed, 12 insertions, 3 deletions
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']
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index edffc5d0..492dba68 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -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