From bd14de24e9515b00198c42107486c99722ed8649 Mon Sep 17 00:00:00 2001 From: Steve Rowe Date: Wed, 30 May 2018 00:39:26 -0400 Subject: [PATCH] SOLR-12388: print out exception when assert fails --- .../org/apache/solr/handler/component/SearchHandlerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java index d8eb6a484c4..b6fc68c1100 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/SearchHandlerTest.java @@ -246,7 +246,7 @@ public class SearchHandlerTest extends SolrTestCaseJ4 req.process(httpSolrClient); fail("An exception should be thrown when ZooKeeper is not connected and shards.tolerant=requireZkConnected"); } catch (Exception e) { - assertTrue(e.getMessage().contains("no servers hosting shard:")); + assertTrue("Exception message is missing 'no servers hosting shard:': " + e, e.getMessage().contains("no servers hosting shard:")); } } finally {