Skip to content

Commit

Permalink
Add a wait baseline when looking up registry values (elastic#8216) (e…
Browse files Browse the repository at this point in the history
…lastic#8239)

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 elastic#8102

(cherry picked from commit ca78d74)
  • Loading branch information
ph authored Sep 5, 2018
1 parent 1ec83ef commit 191d08c
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 191d08c

Please sign in to comment.