You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/10/26 18:50:05 UTC
[GitHub] [solr] risdenk opened a new pull request, #1133: SOLR-16501: Fix JvmMetricsTest NPE
risdenk opened a new pull request, #1133:
URL: https://github.com/apache/solr/pull/1133
https://issues.apache.org/jira/browse/SOLR-16501
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] risdenk merged pull request #1133: SOLR-16501: Fix JvmMetricsTest NPE
Posted by GitBox <gi...@apache.org>.
risdenk merged PR #1133:
URL: https://github.com/apache/solr/pull/1133
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] epugh commented on pull request #1133: SOLR-16501: Fix JvmMetricsTest NPE
Posted by GitBox <gi...@apache.org>.
epugh commented on PR #1133:
URL: https://github.com/apache/solr/pull/1133#issuecomment-1292592980
Seems like nice refactoring!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
[GitHub] [solr] risdenk commented on a diff in pull request #1133: SOLR-16501: Fix JvmMetricsTest NPE
Posted by GitBox <gi...@apache.org>.
risdenk commented on code in PR #1133:
URL: https://github.com/apache/solr/pull/1133#discussion_r1006071283
##########
solr/core/src/test/org/apache/solr/metrics/JvmMetricsTest.java:
##########
@@ -92,9 +91,10 @@ public void testSystemProperties() {
}
SolrMetricManager metricManager = jetty.getCoreContainer().getMetricManager();
Map<String, Metric> metrics = metricManager.registry("solr.jvm").getMetrics();
- MetricsMap map =
- (MetricsMap) ((SolrMetricManager.GaugeWrapper) metrics.get("system.properties")).getGauge();
- assertNotNull(map);
+ Metric metric = metrics.get("system.properties");
+ assertNotNull(metrics.toString(), metric);
+ MetricsMap map = (MetricsMap) ((SolrMetricManager.GaugeWrapper<?>) metric).getGauge();
+ assertNotNull(metrics.toString(), map);
Review Comment:
This addresses the NPE by adding an assertion. Doesn't fix the underlying cause - haven't found one yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org