Merge pull request #55028 from DSRCorporation/bugs/multimaster_salt-call_timeout

Increase salt-call timeout for multimaster test.
This commit is contained in:
Daniel Wozniak 2019-10-28 10:33:38 -07:00 committed by GitHub
commit 08a99117aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -65,7 +65,8 @@ class TestHandleEvents(MultimasterModuleCase, MultiMasterTestShellCase, AdaptedC
# Since minion could be not responsive now use `salt-call --local` for this.
res = self.run_call(
"iptables.delete filter INPUT rule='{0}'".format(disconnect_master_rule),
local=True)
local=True,
timeout=30)
self.assertEqual(res, ['local:'])
# Ensure the master is back.
res = self.run_function(

View file

@ -233,11 +233,15 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
arg_str = '--config-dir {0} {1}'.format(self.config_dir, arg_str)
return self.run_script('salt-cp', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr)
def run_call(self, arg_str, with_retcode=False, catch_stderr=False, local=False):
def run_call(self, arg_str, with_retcode=False, catch_stderr=False, local=False, timeout=15):
arg_str = '{0} --config-dir {1} {2}'.format('--local' if local else '',
self.config_dir, arg_str)
return self.run_script('salt-call', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr)
return self.run_script('salt-call',
arg_str,
with_retcode=with_retcode,
catch_stderr=catch_stderr,
timeout=timeout)
def run_cloud(self, arg_str, catch_stderr=False, timeout=None):
'''