summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-05-23 09:17:01 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-05-23 09:17:01 +0300
commit72c25f7830e2d0571ebf021f2a4b1c67fc9486de (patch)
tree9a215c65177045ccad85e9aca8c5e116bc148ae6 /scripts/automation/regression/stateless_tests
parente412cf438e04b590d6c8632a67243335a9cfa827 (diff)
regression: try map at setUp of each test. if fail - reconnect several times until success
Diffstat (limited to 'scripts/automation/regression/stateless_tests')
-rw-r--r--scripts/automation/regression/stateless_tests/stl_general_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_general_test.py b/scripts/automation/regression/stateless_tests/stl_general_test.py
index 982b0a33..ee0f8050 100644
--- a/scripts/automation/regression/stateless_tests/stl_general_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_general_test.py
@@ -16,6 +16,14 @@ class CStlGeneral_Test(CTRexGeneral_Test):
# check basic requirements, should be verified at test_connectivity, here only skip test
if CTRexScenario.stl_init_error:
self.skip(CTRexScenario.stl_init_error)
+ for i in range(20): # workaround of http://trex-tgn.cisco.com/youtrack/issue/trex-210
+ try:
+ self.map_ports()
+ break
+ except:
+ self.stl_trex.disconnect()
+ time.sleep(0.5)
+ self.stl_trex.connect()
def connect(self, timeout = 100):
# need delay and check only because TRex process might be still starting