[TEST] wait for yellow after setup doc tests (#18726)
* [TEST] wait for yellow after setup doc tests We have many places in the doc where we expect and index to be yellow before we execute a query. Therefore we have to always wait for yellow after setup.
This commit is contained in:
parent
24a7b7224b
commit
d55f719f8a
|
@ -170,6 +170,13 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||||
current.println('---')
|
current.println('---')
|
||||||
current.println("setup:")
|
current.println("setup:")
|
||||||
body(setup)
|
body(setup)
|
||||||
|
// always wait for yellow before anything is executed
|
||||||
|
current.println(
|
||||||
|
" - do:\n" +
|
||||||
|
" raw:\n" +
|
||||||
|
" method: GET\n" +
|
||||||
|
" path: \"_cluster/health\"\n" +
|
||||||
|
" wait_for_status: \"yellow\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
private void body(Snippet snippet) {
|
private void body(Snippet snippet) {
|
||||||
|
|
|
@ -23,7 +23,6 @@ PUT /my_index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GET _cluster/health?wait_for_status=yellow
|
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TESTSETUP
|
// TESTSETUP
|
||||||
|
|
|
@ -29,7 +29,6 @@ PUT /my_index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GET /_cluster/health?wait_for_status=yellow
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TESTSETUP
|
// TESTSETUP
|
||||||
|
|
Loading…
Reference in New Issue