You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/05/08 07:25:13 UTC

[GitHub] [shardingsphere] terrymanu commented on a change in pull request #5463: add sharding-metrics unit test coverage rate .

terrymanu commented on a change in pull request #5463:
URL: https://github.com/apache/shardingsphere/pull/5463#discussion_r421986716



##########
File path: sharding-metrics/sharding-metrics-facade/src/test/java/org/apache/shardingsphere/metrics/facade/MetricsTrackerFacadeTest.java
##########
@@ -67,16 +70,28 @@ public void gaugeDec() {
     
     @Test
     public void histogram() {
+        MetricsConfiguration metricsConfiguration = new MetricsConfiguration("fixture", null, null, null);
+        metricsTrackerFacade.init(metricsConfiguration);
+        assertEquals(metricsTrackerFacade.getMetricsTrackerManager().getClass(), MetricsTrackerManagerFixture2.class);
         HistogramMetricsTrackerDelegate delegate = metricsTrackerFacade.histogramStartTimer("request");
-        assertEquals(delegate.getClass(), NoneHistogramMetricsTrackerDelegate.class);
         metricsTrackerFacade.histogramObserveDuration(delegate);
+        assertEquals(delegate.getClass(), NoneHistogramMetricsTrackerDelegate.class);

Review comment:
       Please use assertThat instead of assertEquals




----------------------------------------------------------------
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:
users@infra.apache.org