Fix SolrExporterIntegrationTest to not make assumptions about the JVM that are not true on windows

This commit is contained in:
Chris Hostetter 2019-05-30 11:59:26 -07:00
parent 6ede32a079
commit 61279a2e79
1 changed files with 4 additions and 3 deletions

View File

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