SOLR-12388: print out exception when assert fails

This commit is contained in:
Steve Rowe 2018-05-30 00:39:26 -04:00
parent 6084da559c
commit bd14de24e9
1 changed files with 1 additions and 1 deletions

View File

@ -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 {