diff --git a/x-pack/libbeat/tests/system/test_management.py b/x-pack/libbeat/tests/system/test_management.py index fc9f70b6331..c3a9e6532f2 100644 --- a/x-pack/libbeat/tests/system/test_management.py +++ b/x-pack/libbeat/tests/system/test_management.py @@ -282,7 +282,7 @@ def random_index(self): def check_document_count(self, index, count): try: self.es.indices.refresh(index=index) - return self.es.search(index=index, body={"query": {"match_all": {}}})['hits']['total'] >= count + return self.es.search(index=index, body={"query": {"match_all": {}}})['hits']['total']['value'] >= count except: return False