Commit dc55d680 authored by Rafael Monnerat's avatar Rafael Monnerat

resiliencetest: Verbose log between the interactions to know if the software...

resiliencetest: Verbose log between the interactions to know if the software is working for failing.
parent ceb1ded4
...@@ -189,7 +189,6 @@ class ERP5TestSuite(SlaprunnerTestSuite): ...@@ -189,7 +189,6 @@ class ERP5TestSuite(SlaprunnerTestSuite):
Wait for instance to be started. Wait for instance to be started.
Store the main IP of the slaprunner for future use. Store the main IP of the slaprunner for future use.
""" """
self.logger.debug('Getting the backend URL...') self.logger.debug('Getting the backend URL...')
parameter_dict = self._getPartitionParameterDict() parameter_dict = self._getPartitionParameterDict()
self.slaprunner_backend_url = parameter_dict['backend-url'] self.slaprunner_backend_url = parameter_dict['backend-url']
...@@ -204,9 +203,6 @@ class ERP5TestSuite(SlaprunnerTestSuite): ...@@ -204,9 +203,6 @@ class ERP5TestSuite(SlaprunnerTestSuite):
self._openSoftwareRelease('erp5') self._openSoftwareRelease('erp5')
self._setERP5InstanceParameter() self._setERP5InstanceParameter()
# Debug, remove me.
time.sleep(600)
self._buildSoftwareRelease() self._buildSoftwareRelease()
self._deployInstance() self._deployInstance()
self._deployInstance() self._deployInstance()
......
...@@ -128,6 +128,19 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -128,6 +128,19 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
) )
return data return data
def _retrieveSoftwareLogFileTail(self, truncate=100):
"""
Retrieve the tail of the software.log file.
"""
data = self._connectToSlaprunner(
resource='getFileLog',
data="filename=software.log&truncate=%s" % truncate)
try:
data = json.loads(data)['result']
self.logger.info('Tail of software.log:\n%s' % data)
except (ValueError, KeyError):
self.logger.info("Fail to get software.log")
def _waitForSoftwareBuild(self, limit=5000): def _waitForSoftwareBuild(self, limit=5000):
""" """
...@@ -152,7 +165,10 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -152,7 +165,10 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
self.logger.info('Software release is Failing to Build. Sleeping...') self.logger.info('Software release is Failing to Build. Sleeping...')
else: else:
self.logger.info('Software release is still building. Sleeping...') self.logger.info('Software release is still building. Sleeping...')
time.sleep(60) time.sleep(20)
for sleep_wait in range(3):
self._retrieveSoftwareLogFileTail(truncate=100)
time.sleep(10)
def _buildSoftwareRelease(self): def _buildSoftwareRelease(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