Enable logging and log archiving for cluster tests.
Retry on cord_test_onos_restart/cluster_restart rpc failures.
Change-Id: I549056d72c25c08933a4e9bebfd36f951a608b1c
diff --git a/src/test/utils/CordLogger.py b/src/test/utils/CordLogger.py
index 51c7dc8..b026ab0 100644
--- a/src/test/utils/CordLogger.py
+++ b/src/test/utils/CordLogger.py
@@ -22,7 +22,7 @@
if not controller:
continue
retries = 0
- while retries < 3:
+ while retries < 30:
cli = OnosCliDriver(controller = controller, connect = True)
if cli.handle:
cls.cliSessions[controller] = cli
diff --git a/src/test/utils/CordTestServer.py b/src/test/utils/CordTestServer.py
index de17261..1359850 100644
--- a/src/test/utils/CordTestServer.py
+++ b/src/test/utils/CordTestServer.py
@@ -203,9 +203,14 @@
@nottest
def cord_test_onos_restart(node = None, config = None, timeout = 10):
'''Send ONOS restart to server'''
- data = __cord_test_onos_restart(node = node, config = config, timeout = timeout)
- if data == 'DONE':
- return True
+ for i in range(3):
+ try:
+ data = __cord_test_onos_restart(node = node, config = config, timeout = timeout)
+ if data == 'DONE':
+ return True
+ except:
+ time.sleep(2)
+
return False
@nottest
@@ -225,9 +230,14 @@
@nottest
def cord_test_restart_cluster(config = None, timeout = 10, setup = False):
- data = __cord_test_restart_cluster(config = config, timeout = timeout, setup = setup)
- if data == 'DONE':
- return True
+ for i in range(3):
+ try:
+ data = __cord_test_restart_cluster(config = config, timeout = timeout, setup = setup)
+ if data == 'DONE':
+ return True
+ except:
+ time.sleep(2)
+
return False
@nottest