andywebb1975 commented on a change in pull request #1247: SOLR-14252 use double rather than Double to avoid NPE URL: https://github.com/apache/lucene-solr/pull/1247#discussion_r380299720
########## File path: solr/core/src/test/org/apache/solr/util/stats/MetricUtilsTest.java ########## @@ -103,16 +108,29 @@ public void testMetrics() throws Exception { } else if (k.startsWith("histogram")) { assertEquals(1L, v.get("count")); } else if (k.startsWith("aggregate")) { - assertEquals(2, v.get("count")); + assertEquals(4, v.get("count")); Map<String, Object> values = (Map<String, Object>)v.get("values"); assertNotNull(values); - assertEquals(2, values.size()); + assertEquals(4, values.size()); Map<String, Object> update = (Map<String, Object>)values.get("foo"); assertEquals(10, update.get("value")); assertEquals(1, update.get("updateCount")); update = (Map<String, Object>)values.get("bar"); assertEquals(2, update.get("value")); + // assertEquals(1.5, update.get("mean")); assertEquals(2, update.get("updateCount")); + update = (Map<String, Object>)values.get("baz"); + assertEquals(false, update.get("value")); + // assertEquals(0, update.get("mean")); + // assertEquals(0, update.get("min")); + // assertEquals(0, update.get("max")); + assertEquals(1, update.get("updateCount")); + update = (Map<String, Object>)values.get("neg"); + assertEquals(-10, update.get("value")); + // assertEquals(-10, update.get("max")); Review comment: I'm expecting this test (if it worked!) to fail at the moment, reporting 0 instead of -10. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org