Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing timestamp in test #19796

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion filebeat/tests/system/filebeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ def has_registry(self, name=None, data_path=None):
def get_registry(self, name=None, data_path=None, filter=None):
reg = self.access_registry(name, data_path)
self.wait_until(reg.exists)
return reg.load(filter=filter)

def parse_entry(entry):
extra, sec = entry["timestamp"]
nsec = extra & 0xFFFFFFFF
entry["timestamp"] = sec + (nsec / 1000000000)
return entry

entries = [parse_entry(entry) for entry in reg.load(filter=filter)]
return entries

def get_registry_entry_by_path(self, path):
"""
Expand Down