Commit 52f41344 authored by Nicolas Wavrant's avatar Nicolas Wavrant

resiliencytest: _returnNewInstanceParameter may sometimes change, even if run by test node

parent f66a0190
Pipeline #3106 skipped
...@@ -242,7 +242,8 @@ class ERP5TestSuite(SlaprunnerTestSuite): ...@@ -242,7 +242,8 @@ class ERP5TestSuite(SlaprunnerTestSuite):
old_slaprunner_backend_url = self.slaprunner_backend_url old_slaprunner_backend_url = self.slaprunner_backend_url
self.slaprunner_backend_url = self._returnNewInstanceParameter( self.slaprunner_backend_url = self._returnNewInstanceParameter(
parameter_key='backend_url', parameter_key='backend_url',
old_parameter_value=old_slaprunner_backend_url old_parameter_value=old_slaprunner_backend_url,
force_new=True,
) )
self._login() self._login()
self._waitForSoftwareBuild() self._waitForSoftwareBuild()
......
...@@ -136,14 +136,14 @@ class ResiliencyTestSuite(object): ...@@ -136,14 +136,14 @@ class ResiliencyTestSuite(object):
).getConnectionParameterDict() ).getConnectionParameterDict()
self.deleteTimestamp() self.deleteTimestamp()
def _returnNewInstanceParameter(self, parameter_key, old_parameter_value): def _returnNewInstanceParameter(self, parameter_key, old_parameter_value, force_new=False):
""" """
Helper, can be used inside of checkDataOnCloneInstance. Helper, can be used inside of checkDataOnCloneInstance.
Wait for the new parameter (of old-clone new-main instance) to appear. Wait for the new parameter (of old-clone new-main instance) to appear.
Check than it is different from the old parameter Check than it is different from the old parameter
""" """
# if we are inside of a classical erp5testnode: just return the same parameter. # if we are inside of a classical erp5testnode: just return the same parameter.
if self.test_type == UNIT_TEST_ERP5TESTNODE: if self.test_type == UNIT_TEST_ERP5TESTNODE and not force_new:
return old_parameter_value return old_parameter_value
self.logger.info('Waiting for new main instance to be ready...') self.logger.info('Waiting for new main instance to be ready...')
......
...@@ -245,7 +245,8 @@ class SlaprunnerTestSuite(ResiliencyTestSuite): ...@@ -245,7 +245,8 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
old_slaprunner_backend_url = self.slaprunner_backend_url old_slaprunner_backend_url = self.slaprunner_backend_url
self.slaprunner_backend_url = self._returnNewInstanceParameter( self.slaprunner_backend_url = self._returnNewInstanceParameter(
parameter_key='backend-url', parameter_key='backend-url',
old_parameter_value=old_slaprunner_backend_url old_parameter_value=old_slaprunner_backend_url,
force_new=True,
) )
self._login() self._login()
self._waitForSoftwareBuild() self._waitForSoftwareBuild()
......
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