From ce84a8df12e6a9be6b2580aa3351b055810daf6f Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Wed, 7 Sep 2016 11:10:28 +0100 Subject: [PATCH] Improve error message to help debug test failures --- solr/core/src/test/org/apache/solr/TestDistributedSearch.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java index e88afe9d28f..a5cc80cf278 100644 --- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java +++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java @@ -1169,12 +1169,12 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase { if (upShards.contains(s)) { // this is no longer true if there was a query timeout on an up shard // assertTrue("Expected to find numFound in the up shard info",info.get("numFound") != null); - assertTrue("Expected to find shardAddress in the up shard info",info.get("shardAddress") != null); + assertTrue("Expected to find shardAddress in the up shard info: " + info.toString(), info.get("shardAddress") != null); } else { assertEquals("Expected to find the "+SolrQueryResponse.RESPONSE_HEADER_PARTIAL_RESULTS_KEY+" header set if a shard is down", Boolean.TRUE, rsp.getHeader().get(SolrQueryResponse.RESPONSE_HEADER_PARTIAL_RESULTS_KEY)); - assertTrue("Expected to find error in the down shard info",info.get("error") != null); + assertTrue("Expected to find error in the down shard info: " + info.toString(), info.get("error") != null); } } }