Skip to content

Commit

Permalink
ci: fix flaky es search query
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Jan 8, 2025
1 parent 2a6774e commit 2a82f38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/contrib/elasticsearch/test_elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ def test_elasticsearch(self):
es.index(id=10, body={"name": "ten", "created": datetime.date(2016, 1, 1)}, **args)
es.index(id=11, body={"name": "eleven", "created": datetime.date(2016, 2, 1)}, **args)
es.index(id=12, body={"name": "twelve", "created": datetime.date(2016, 3, 1)}, **args)
result = es.search(sort=["name:desc"], size=100, body={"query": {"match_all": {}}}, **args)
result = es.search(
sort={"name": {"order": "desc", "unmapped_type": "keyword"}},
size=100,
body={"query": {"match_all": {}}},
**args,
)

assert len(result["hits"]["hits"]) == 3, result
spans = self.get_spans()
Expand Down

0 comments on commit 2a82f38

Please sign in to comment.