Skip to content

Commit

Permalink
ES: fix another flaky test (#11647)
Browse files Browse the repository at this point in the history
ES: fix another flaky tes

Similar to #11640
  • Loading branch information
stsewd authored Oct 3, 2024
1 parent 07a4fa6 commit 3ef4d4b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions readthedocs/search/tests/test_faceted_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ def test_search_exact_match(self, client, project, case):
results = page_search.execute()

assert len(results) == 2
assert results[0]["project"] == "kuma"
assert results[0]["path"] == "testdocumentation"
assert results[0]["version"] == "latest"

assert results[1]["project"] == "kuma"
assert results[1]["path"] == "testdocumentation"
assert results[1]["version"] == "stable"
# Both versions have the same exact content.
# Order of results is not deterministic anymore for some reason,
# so we use a set to compare the results.
assert {result["version"] for result in results} == {"stable", "latest"}
for result in results:
assert result["project"] == "kuma"
assert result["path"] == "testdocumentation"

def test_search_combined_result(self, client, project):
"""Check search result are combined of both `AND` and `OR` operator
Expand Down

0 comments on commit 3ef4d4b

Please sign in to comment.