From a1916658a95904e68499c65c84ac2adb85f72732 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Mon, 11 Jun 2018 12:45:27 +0200 Subject: [PATCH] [Tests] Fix self-referencing tests This commit adapts some test after #31044 has been merged. --- .../test/resources/rest-api-spec/test/painless/30_search.yml | 2 +- .../test/resources/rest-api-spec/test/painless/40_exception.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml index b7be116b386..a9aa00aa5e0 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/30_search.yml @@ -439,6 +439,6 @@ source: "def x = [:] ; def y = [:] ; x.a = y ; y.a = x ; return x" - match: { error.root_cause.0.type: "illegal_argument_exception" } - - match: { error.root_cause.0.reason: "Iterable object is self-referencing itself" } + - match: { error.root_cause.0.reason: "Iterable object is self-referencing itself (ScriptBytesValues value)" } - match: { error.type: "search_phase_execution_exception" } - match: { error.reason: "all shards failed" } diff --git a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml index 74a7d6eefb0..b8839ea364e 100644 --- a/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml +++ b/x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/painless/40_exception.yml @@ -76,7 +76,7 @@ - match: { watch_record.state: "executed" } - match: { watch_record.result.actions.0.status: "failure" } - match: { watch_record.result.actions.0.error.caused_by.caused_by.type: "illegal_argument_exception" } - - match: { watch_record.result.actions.0.error.caused_by.caused_by.reason: "Iterable object is self-referencing itself" } + - match: { watch_record.result.actions.0.error.caused_by.caused_by.reason: "Iterable object is self-referencing itself (CustomReflectionObjectHandler stringify)" } - do: catch: bad_request