Skip to content

Commit

Permalink
Merge pull request #47846 from Ch3LL/p_refresh_test
Browse files Browse the repository at this point in the history
Fix flaky refresh pillar integration test
  • Loading branch information
Nicole Thomas committed May 25, 2018
2 parents 799fce9 + 019edad commit 0bf651b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/integration/modules/test_saltutil.py
Expand Up @@ -188,7 +188,18 @@ def test_pillar_refresh(self):
'''))

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'))
Expand Down

0 comments on commit 0bf651b

Please sign in to comment.