diff --git common/src/test/org/apache/hadoop/hive/common/metrics/TestMetrics.java common/src/test/org/apache/hadoop/hive/common/metrics/TestMetrics.java index 6282e20..e85d3f8 100644 --- common/src/test/org/apache/hadoop/hive/common/metrics/TestMetrics.java +++ common/src/test/org/apache/hadoop/hive/common/metrics/TestMetrics.java @@ -197,6 +197,7 @@ public Void call() throws Exception { @Test public void testScopeConcurrency() throws Exception { + MetricsScope fooScope = Metrics.startScope(scopeName); final int threads = 10; ExecutorService executorService = Executors.newFixedThreadPool(threads); for (int i=0; i 3 * periodMs * threads); Double avgT = (Double)Metrics.get("foo.avg_t"); assertTrue(avgT.doubleValue() > periodMs); + Metrics.endScope(scopeName); } void testScopeImpl(int n) throws Exception {