Skip to content

Commit

Permalink
Add a wait baseline when looking up registry values (#8216)
Browse files Browse the repository at this point in the history
With the nature of VMs and disk, writing or reading a file can be out of sync.
Instead of only sleeping only the windows case we sleep on every tested
platform before asserting the content of the registry.

closes #8102
  • Loading branch information
ph committed Sep 5, 2018
1 parent ed6f1c2 commit ca78d74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions filebeat/tests/system/test_registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,8 @@ def test_clean_inactive(self):
lambda: self.log_contains_count("Registry file updated") > 1,
max_timeout=15)

if os.name == "nt":
# On windows registry recreation can take a bit longer
time.sleep(1)
# Syncing file on disk is always susceptible to timing issues.
time.sleep(1)

data = self.get_registry()
assert len(data) == 2
Expand Down

0 comments on commit ca78d74

Please sign in to comment.