Add error_trace parameter to REST test helper (#54259)
Today the `XPackRestTestHelper` makes some REST calls without the `error_trace` parameter, so that if they fail due to an exception we do not see very much detail. This commit adds the `error_trace` parameter to help identify why these REST calls fail.
This commit is contained in:
parent
ad3c96e250
commit
ffe1ba3754
|
@ -44,6 +44,7 @@ public final class XPackRestTestHelper {
|
|||
assertBusy(() -> {
|
||||
Request request = new Request("GET", "/_cat/nodes");
|
||||
request.addParameter("h", "master,version");
|
||||
request.addParameter("error_trace", "true");
|
||||
String response = EntityUtils.toString(client.performRequest(request).getEntity());
|
||||
|
||||
for (String line : response.split("\n")) {
|
||||
|
@ -58,6 +59,7 @@ public final class XPackRestTestHelper {
|
|||
assertBusy(() -> {
|
||||
final Request request = new Request("GET", "_template");
|
||||
request.setOptions(allowTypesRemovalWarnings());
|
||||
request.addParameter("error_trace", "true");
|
||||
|
||||
String string = EntityUtils.toString(client.performRequest(request).getEntity());
|
||||
Map<String, Object> response = XContentHelper.convertToMap(JsonXContent.jsonXContent, string, false);
|
||||
|
|
Loading…
Reference in New Issue