mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47846 from Ch3LL/p_refresh_test
Fix flaky refresh pillar integration test
This commit is contained in:
commit
0bf651b470
1 changed files with 12 additions and 1 deletions
|
@ -188,7 +188,18 @@ class SaltUtilSyncPillarTest(ModuleCase):
|
|||
'''))
|
||||
|
||||
pillar_refresh = self.run_function('saltutil.refresh_pillar')
|
||||
wait = self.run_function('test.sleep', [5])
|
||||
|
||||
pillar = False
|
||||
timeout = time.time() + 30
|
||||
while not pillar:
|
||||
post_pillar = self.run_function('pillar.raw')
|
||||
try:
|
||||
self.assertIn(pillar_key, post_pillar.get(pillar_key, 'didnotwork'))
|
||||
pillar = True
|
||||
except AssertionError:
|
||||
if time.time() > timeout:
|
||||
self.assertIn(pillar_key, post_pillar.get(pillar_key, 'didnotwork'))
|
||||
continue
|
||||
|
||||
post_pillar = self.run_function('pillar.raw')
|
||||
self.assertIn(pillar_key, post_pillar.get(pillar_key, 'didnotwork'))
|
||||
|
|
Loading…
Add table
Reference in a new issue