mirror of https://github.com/apache/lucene.git
SOLR-10050 Fix SolrMetricManagerTest.testClearMetrics() failures.
This commit is contained in:
parent
bb9b423cec
commit
f73d93ac1b
|
@ -143,13 +143,13 @@ public class SolrMetricManagerTest extends SolrTestCaseJ4 {
|
|||
|
||||
assertEquals(metrics.size() * 3, metricManager.registry(registryName).getMetrics().size());
|
||||
|
||||
// clear "foo.bar"
|
||||
Set<String> removed = metricManager.clearMetrics(registryName, "foo", "bar");
|
||||
// clear all metrics with prefix "foo.bar."
|
||||
Set<String> removed = metricManager.clearMetrics(registryName, "foo", "bar.");
|
||||
assertEquals(metrics.size(), removed.size());
|
||||
for (String s : removed) {
|
||||
assertTrue(s.startsWith("foo.bar."));
|
||||
}
|
||||
removed = metricManager.clearMetrics(registryName, "foo", "baz");
|
||||
removed = metricManager.clearMetrics(registryName, "foo", "baz.");
|
||||
assertEquals(metrics.size(), removed.size());
|
||||
for (String s : removed) {
|
||||
assertTrue(s.startsWith("foo.baz."));
|
||||
|
|
|
@ -63,7 +63,7 @@ public class SolrIndexMetricsTest extends SolrTestCaseJ4 {
|
|||
|
||||
assertTrue(metrics.entrySet().stream().filter(e -> e.getKey().startsWith("INDEX")).count() >= 12);
|
||||
// this is variable, depending on the codec and the number of created files
|
||||
assertTrue(metrics.entrySet().stream().filter(e -> e.getKey().startsWith("DIRECTORY")).count() > 50);
|
||||
assertTrue(metrics.entrySet().stream().filter(e -> e.getKey().startsWith("DIRECTORY")).count() > 20);
|
||||
|
||||
// check basic index meters
|
||||
Timer timer = (Timer)metrics.get("INDEX.merge.minor");
|
||||
|
|
Loading…
Reference in New Issue