CLOUDSTACK-5619: Egress Firewall rules - Increased timeout for router to come up

This commit is contained in:
Ashutosh K 2014-01-08 19:22:07 +05:30 committed by Girish Shilamkar
parent 3e45dfb942
commit e58c3c809d

View File

@ -291,8 +291,8 @@ class TestEgressFWRules(cloudstackTestCase):
self.debug("%s %s" % (script_file, exec_cmd_params)) self.debug("%s %s" % (script_file, exec_cmd_params))
exec_success = False exec_success = False
#Timeout set to 6 minutes #Timeout set to 12 minutes
timeout = 360 timeout = 720
while timeout: while timeout:
self.debug('sleep %s seconds for egress rule to affect on Router.' % self.services['sleep']) self.debug('sleep %s seconds for egress rule to affect on Router.' % self.services['sleep'])
time.sleep(self.services['sleep']) time.sleep(self.services['sleep'])
@ -304,17 +304,15 @@ class TestEgressFWRules(cloudstackTestCase):
exec_success = True exec_success = True
break break
else: else:
if result == []:
self.fail("Router is not accessible")
# This means router network did not come up as yet loop back. # This means router network did not come up as yet loop back.
if "send" in result[0]: if ((result == []) or ("send" in result[0])):
timeout -= self.services['sleep'] timeout -= self.services['sleep']
else: # Failed due to some other error else: # Failed due to some other error
break break
#end while #end while
if timeout == 0: if timeout == 0:
self.fail("Router network failed to come up after 6 minutes.") self.fail("Router network failed to come up after 12 minutes.")
ssh.execute('rm -rf %s' % script_file) ssh.execute('rm -rf %s' % script_file)