Skip to content

Commit 69f75dc

Browse files
authored
Decouple rest bwc test from shard number (#140336) (#140374)
Currently the rest compatibility test tightly couples the validation to the shard number returned. This will cause issues when we change the shard routing and is not really something our rest compatibility should validate.
1 parent f2ab526 commit 69f75dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/35_search_failure.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
- match: {error.phase: query}
3131
- match: {error.root_cause.0.type: script_exception}
3232
- match: {error.root_cause.0.reason: runtime error}
33-
- match: {error.failed_shards.0.shard: 0}
33+
# The shard number can vary based on the shard routing function version. Just check that it's between 0 and 1.
34+
- gte: { error.failed_shards.0.shard: 0 }
35+
- lte: { error.failed_shards.0.shard: 1 }
3436
- match: {error.failed_shards.0.index: source}
3537
- is_true: error.failed_shards.0.node
3638
- match: {error.failed_shards.0.reason.type: script_exception}

0 commit comments

Comments
 (0)