From fe5af6f34d1204b6238c46c3aff7ea2a056eeb7a Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 6 May 2015 01:02:05 -0400 Subject: [PATCH] Tests: fix test bug (foo -> bar) --- .../org/elasticsearch/action/search/ShardSearchFailure.java | 2 +- src/test/java/org/elasticsearch/script/GroovySecurityTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java b/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java index 4a6e073e288..c090c3e6d72 100644 --- a/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java +++ b/src/main/java/org/elasticsearch/action/search/ShardSearchFailure.java @@ -124,7 +124,7 @@ public class ShardSearchFailure implements ShardOperationFailedException, ToXCon @Override public String toString() { - return "shard [" + (shardTarget == null ? "_na" : shardTarget) + "], reason [" + reason + "]"; + return "shard [" + (shardTarget == null ? "_na" : shardTarget) + "], reason [" + reason + "], cause [" + (cause == null ? "_na" : ExceptionsHelper.stackTrace(cause)) + "]"; } public static ShardSearchFailure readShardSearchFailure(StreamInput in) throws IOException { diff --git a/src/test/java/org/elasticsearch/script/GroovySecurityTests.java b/src/test/java/org/elasticsearch/script/GroovySecurityTests.java index 3051555ea28..1fc65e9e9c9 100644 --- a/src/test/java/org/elasticsearch/script/GroovySecurityTests.java +++ b/src/test/java/org/elasticsearch/script/GroovySecurityTests.java @@ -61,7 +61,7 @@ public class GroovySecurityTests extends ElasticsearchIntegrationTest { // numeric field access assertSuccess("def foo = doc['foo'].value; if (foo == null) { return 5; }"); // string field access - assertSuccess("def bar = doc['bar'].value; if (foo == null) { return 5; }"); + assertSuccess("def bar = doc['bar'].value; if (bar == null) { return 5; }"); // List assertSuccess("def list = [doc['foo'].value, 3, 4]; def v = list.get(1); list.add(10)"); // Ranges