mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
Test: Only run the test that verifies the pending
field in the _shards
header if the test cluster has two are more data nodes.
This commit is contained in:
parent
102e7adfad
commit
a88dd36df4
@ -3,33 +3,24 @@
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: foobar1
|
||||
index: foobar
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: "1"
|
||||
number_of_replicas: "0"
|
||||
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: foobar2
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: "1"
|
||||
number_of_replicas: "1"
|
||||
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: green
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: foobar1
|
||||
index: foobar
|
||||
type: baz
|
||||
id: 1
|
||||
body: { foo: bar }
|
||||
|
||||
- match: { _index: foobar1 }
|
||||
- match: { _index: foobar }
|
||||
- match: { _type: baz }
|
||||
- match: { _id: "1"}
|
||||
- match: { _version: 1}
|
||||
@ -37,20 +28,3 @@
|
||||
- match: { _shards.successful: 1}
|
||||
- match: { _shards.failed: 0}
|
||||
- is_false: _shards.pending
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: foobar2
|
||||
type: baz
|
||||
id: 1
|
||||
replication: async
|
||||
body: { foo: bar }
|
||||
|
||||
- match: { _index: foobar2 }
|
||||
- match: { _type: baz }
|
||||
- match: { _id: "1"}
|
||||
- match: { _version: 1}
|
||||
- match: { _shards.total: 2}
|
||||
- match: { _shards.successful: 1}
|
||||
- match: { _shards.failed: 0}
|
||||
- match: { _shards.pending: 1}
|
||||
|
34
rest-api-spec/test/index/12_shard_header_pending.yaml
Normal file
34
rest-api-spec/test/index/12_shard_header_pending.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
"Index check shard header pending field":
|
||||
|
||||
- skip:
|
||||
features: "requires_replica"
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: foobar
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: "1"
|
||||
number_of_replicas: "1"
|
||||
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: green
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: foobar
|
||||
type: baz
|
||||
id: 1
|
||||
replication: async
|
||||
body: { foo: bar }
|
||||
|
||||
- match: { _index: foobar }
|
||||
- match: { _type: baz }
|
||||
- match: { _id: "1"}
|
||||
- match: { _version: 1}
|
||||
- match: { _shards.total: 2}
|
||||
- match: { _shards.successful: 1}
|
||||
- match: { _shards.failed: 0}
|
||||
- match: { _shards.pending: 1}
|
@ -48,6 +48,9 @@ public final class Features {
|
||||
if ("benchmark".equals(feature) && ElasticsearchIntegrationTest.cluster().numBenchNodes() > 0) {
|
||||
continue;
|
||||
}
|
||||
if ("requires_replica".equals(feature) && ElasticsearchIntegrationTest.cluster().numDataNodes() >= 2) {
|
||||
continue;
|
||||
}
|
||||
if (!SUPPORTED.contains(feature)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user