Retry Hosts call on consistent Map timeouts
Change-Id: I7f2fd9c1973d8543d576eb57473edc7ab1ea8209
(cherry picked from commit baf5316af9eb1b9df6e5dbcc37e6fd6f94551b14)
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 1a5bbfe..340df87 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -2074,9 +2074,11 @@
ipResult = main.TRUE
threads = []
for i in range( main.numCtrls ):
- t = main.Thread( target=main.CLIs[i].hosts,
+ t = main.Thread( target=utilities.retry,
name="hosts-" + str( i ),
- args=[ ] )
+ args=[ main.CLIs[i].hosts, [ None ] ],
+ kwargs= { 'sleep': 5, 'attempts': 5,
+ 'randomTime': True } )
threads.append( t )
t.start()
@@ -2217,7 +2219,7 @@
elif i == 28:
deviceId = "2800".zfill(16)
mappings[ macId ] = deviceId
- if hosts[ controller ] and "Error" not in hosts[ controller ]:
+ if hosts[ controller ] is not None and "Error" not in hosts[ controller ]:
if hosts[ controller ] == []:
main.log.warn( "There are no hosts discovered" )
zeroHosts = True