Disable disk watermarks on REST tests (#21803)

REST tests use the default OOTB low/high disk watermarks of 85%/90%, which can make some tests fail if run on a machine with a fuller disk. This commit changes the watermarks in the same way as in IntegTestCase so that they're essentially ignored.
This commit is contained in:
Yannick Welsch 2016-11-25 19:52:52 +01:00 committed by GitHub
parent efba64d60a
commit 590a6372ad
2 changed files with 3 additions and 21 deletions

View File

@ -286,6 +286,9 @@ class ClusterFormationTasks {
esConfig['node.max_local_storage_nodes'] = node.config.numNodes
esConfig['http.port'] = node.config.httpPort
esConfig['transport.tcp.port'] = node.config.transportPort
// Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space
esConfig['cluster.routing.allocation.disk.watermark.low'] = '1b'
esConfig['cluster.routing.allocation.disk.watermark.high'] = '1b'
esConfig.putAll(node.config.settings)
Task writeConfig = project.tasks.create(name: name, type: DefaultTask, dependsOn: setup)

View File

@ -1,24 +1,3 @@
---
setup:
# Disable the disk threshold decider so the test doesn't fail if the disk is
# > 85% full
- do:
cluster.put_settings:
body:
persistent:
cluster.routing.allocation.disk.threshold_enabled: false
flat_settings: true
---
teardown:
# Reset the disk threshold decider so we don't leave anything behind.
- do:
cluster.put_settings:
body:
persistent:
cluster.routing.allocation.disk.threshold_enabled: null
flat_settings: true
---
"Shrink index via API":
# creates an index with one document solely allocated on the master node