Apache Lucene open-source search software
Fix SolrExporterIntegrationTest to not make assumptions about the JVM that are not true on windows
Chris Hostetter61279a2e79c4
diff --git a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.javaindex 4ad59d6b2ba..402ade6eed4 100644--- a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java+++ b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterIntegrationTest.java@@ -67,9 +67,10 @@ public class SolrExporterIntegrationTest extends SolrExporterTestBase {Map<String, Double> jvmMetrics = metricsWithName(getAllMetrics(), "solr_metrics_jvm_threads");- // Include all thread states + plus overall count + number of daemon threads + number of deadlocked threads- assertEquals(NUM_NODES * (Thread.State.values().length + 3),- jvmMetrics.size());+ // exact set of metrics can vary based on JVM impl (ie: windows)+ // but there should always be at least one per known thread state per node...+ assertTrue(jvmMetrics.toString(),+ (NUM_NODES * Thread.State.values().length) < jvmMetrics.size());}@Test