mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 12:56:53 +00:00
Replace is_true: took with took >= 0
This prevents tests from failing on machines that can finish the request less than half a millisecond.
This commit is contained in:
parent
9402251eaf
commit
0e6141e675
@ -46,7 +46,7 @@ public class ReindexResponse extends BulkIndexByScrollResponse {
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.field("took", getTook());
|
||||
builder.field("took", getTook().millis());
|
||||
builder.field("timed_out", isTimedOut());
|
||||
getStatus().innerXContent(builder, params, true, false);
|
||||
builder.startArray("failures");
|
||||
|
@ -22,7 +22,7 @@
|
||||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
- is_false: task
|
||||
|
||||
---
|
||||
@ -55,7 +55,7 @@
|
||||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
- is_false: task
|
||||
|
||||
---
|
||||
@ -133,7 +133,7 @@
|
||||
- match: {failures.0.cause.reason: "/\\[foo\\]\\[1\\]:.version.conflict,.document.already.exists.\\(current.version.\\[\\d+\\]\\)/"}
|
||||
- match: {failures.0.cause.shard: /\d+/}
|
||||
- match: {failures.0.cause.index: dest}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Response format for version conflict with conflicts=proceed":
|
||||
@ -167,7 +167,7 @@
|
||||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Simplest example in docs":
|
||||
|
@ -49,5 +49,5 @@
|
||||
- match: {failures: []}
|
||||
- gt: {throttled_millis: 1000}
|
||||
- lt: {throttled_millis: 4000}
|
||||
- is_true: took
|
||||
- gte: { took: 1000 }
|
||||
- is_false: task
|
||||
|
@ -19,7 +19,7 @@
|
||||
- match: {failures: []}
|
||||
- match: {noops: 0}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
- is_false: created # Update by query can't create
|
||||
- is_false: task
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
- match: {failures.0.cause.reason: "/\\[foo\\]\\[1\\]:.version.conflict,.current.version.\\[\\d+\\].is.different.than.the.one.provided.\\[\\d+\\]/"}
|
||||
- match: {failures.0.cause.shard: /\d+/}
|
||||
- match: {failures.0.cause.index: test}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Response for version conflict with conflicts=proceed":
|
||||
@ -128,7 +128,7 @@
|
||||
- match: {noops: 0}
|
||||
- match: {failures: []}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Limit by query":
|
||||
@ -158,7 +158,7 @@
|
||||
- match: {version_conflicts: 0}
|
||||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Limit by size":
|
||||
@ -186,7 +186,7 @@
|
||||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- match: {throttled_millis: 0}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
||||
---
|
||||
"Can override scroll_size":
|
||||
|
@ -31,4 +31,4 @@
|
||||
- match: {failures.0.reason.reason: "failed to run inline script [1/0] using lang [groovy]"}
|
||||
- match: {failures.0.reason.caused_by.type: arithmetic_exception}
|
||||
- match: {failures.0.reason.caused_by.reason: Division by zero}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
@ -27,4 +27,4 @@
|
||||
- match: {failures.0.reason.reason: "failed to run inline script [1/0] using lang [groovy]"}
|
||||
- match: {failures.0.reason.caused_by.type: arithmetic_exception}
|
||||
- match: {failures.0.reason.caused_by.reason: Division by zero}
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
|
@ -27,7 +27,7 @@
|
||||
filter_path: "*"
|
||||
body: "{ query: { match_all: {} } }"
|
||||
|
||||
- is_true: took
|
||||
- gte: { took: 0 }
|
||||
- is_true: _shards.total
|
||||
- is_true: hits.total
|
||||
- is_true: hits.hits.0._index
|
||||
@ -84,4 +84,3 @@
|
||||
- is_true: hits.hits.1._index
|
||||
- is_false: hits.hits.1._type
|
||||
- is_true: hits.hits.1._id
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user