lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [10/35] lucene-solr:jira/solr-8593: SOLR-10050 Fix SolrMetricManagerTest.testClearMetrics() failures.
Date Wed, 01 Feb 2017 17:00:38 GMT
SOLR-10050 Fix SolrMetricManagerTest.testClearMetrics() failures.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f73d93ac
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f73d93ac
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f73d93ac

Branch: refs/heads/jira/solr-8593
Commit: f73d93ac1b30d354c0a9633225470fbb7799f480
Parents: bb9b423
Author: Andrzej Bialecki <ab@apache.org>
Authored: Mon Jan 30 13:16:44 2017 +0100
Committer: Andrzej Bialecki <ab@apache.org>
Committed: Mon Jan 30 13:21:21 2017 +0100

----------------------------------------------------------------------
 .../test/org/apache/solr/metrics/SolrMetricManagerTest.java    | 6 +++---
 .../src/test/org/apache/solr/update/SolrIndexMetricsTest.java  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f73d93ac/solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java
index ecddfba..0d94c1a 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java
@@ -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."));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f73d93ac/solr/core/src/test/org/apache/solr/update/SolrIndexMetricsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/SolrIndexMetricsTest.java b/solr/core/src/test/org/apache/solr/update/SolrIndexMetricsTest.java
index 4f5ea69..850ce03 100644
--- a/solr/core/src/test/org/apache/solr/update/SolrIndexMetricsTest.java
+++ b/solr/core/src/test/org/apache/solr/update/SolrIndexMetricsTest.java
@@ -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");


Mime
View raw message