Skip to content

Commit 20e821e

Browse files
committed
Add error_trace parameter to REST test helper (elastic#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.
1 parent 8a654b0 commit 20e821e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

x-pack/qa/src/main/java/org/elasticsearch/xpack/test/rest/XPackRestTestHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public static void waitForTemplates(RestClient client, List<String> expectedTemp
4444
assertBusy(() -> {
4545
Request request = new Request("GET", "/_cat/nodes");
4646
request.addParameter("h", "master,version");
47+
request.addParameter("error_trace", "true");
4748
String response = EntityUtils.toString(client.performRequest(request).getEntity());
4849

4950
for (String line : response.split("\n")) {
@@ -58,6 +59,7 @@ public static void waitForTemplates(RestClient client, List<String> expectedTemp
5859
assertBusy(() -> {
5960
final Request request = new Request("GET", "_template");
6061
request.setOptions(allowTypesRemovalWarnings());
62+
request.addParameter("error_trace", "true");
6163

6264
String string = EntityUtils.toString(client.performRequest(request).getEntity());
6365
Map<String, Object> response = XContentHelper.convertToMap(JsonXContent.jsonXContent, string, false);

0 commit comments

Comments
 (0)