Bladeren bron

Fix took assertion in response filter test

This test asserts that the took time exists by using the is_true
assertion. This assertion fails if the took time was zero as is_true
asserts that the field is not the empty string, not the string "false",
and not 0. If the search returns quickly, and took time is measured
using a high-precision monotonic clock, the took time can be zero. This
commit changes the assertion to use gte.
Jason Tedor 8 jaren geleden
bovenliggende
commit
f56900da9f

+ 1 - 1
rest-api-spec/src/main/resources/rest-api-spec/test/search/70_response_filtering.yaml

@@ -43,7 +43,7 @@
         filter_path: "took"
         body: "{ \"query\": { \"match_all\": {} } }"
 
-  - is_true:  took
+  - gte: { took: 0 }
   - is_false: _shards.total
   - is_false: hits.total
   - is_false: hits.hits.0._index