slaprunner resilient test: update API about slapgridResult.

Allow to detect if instance has been processed or not.
parent c75a71ff
......@@ -161,9 +161,12 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
except (NotHttpOkException, urllib2.HTTPError):
# The nginx frontend might timeout before someftware release is finished.
pass
while self._connectToSlaprunner(resource='slapgridResult', data='position=0&log=').find('"instance": true') is not -1:
self.logger.info('Buildout is still running. Sleeping...')
while True:
time.sleep(15)
result = json.loads(self._connectToSlaprunner(resource='slapgridResult', data='position=0&log='))
if result['instance']['state'] is False:
break
self.logger.info('Buildout is still running. Sleeping...')
self.logger.info('Instance has been deployed.')
def _gitClone(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment