Apache Solr open-source search software
SOLR-11281: Improve failure message.
Andrzej Bialecki946c6a95faa6
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrSlf4jReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrSlf4jReporterTest.javaindex 37bb940dac4..137872a8460 100644--- a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrSlf4jReporterTest.java+++ b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrSlf4jReporterTest.java@@ -81,7 +81,11 @@ public class SolrSlf4jReporterTest extends SolrTestCaseJ4 {SolrDocumentList history = watcher.getHistory(-1, null);// dot-separated names are treated like class names and collapsed// in regular log output, but here we get the full name- assertTrue(history.stream().filter(d -> "solr.node".equals(d.getFirstValue("logger"))).count() > 0);- assertTrue(history.stream().filter(d -> "foobar".equals(d.getFirstValue("logger"))).count() > 0);+ if (history.stream().filter(d -> "solr.node".equals(d.getFirstValue("logger"))).count() == 0) {+ fail("No 'solr.node' logs in: " + history.toString());+ }+ if (history.stream().filter(d -> "foobar".equals(d.getFirstValue("logger"))).count() == 0) {+ fail("No 'foobar' logs in: " + history.toString());+ }}}