This is an automated email from the ASF dual-hosted git repository. zhangzc pushed a commit to branch kylin-on-parquet-v2 in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/kylin-on-parquet-v2 by this push: new 133bfb8 KYLIN-5029 set metrics refresh interval to a smaller value to make sure tests always passed (#1683) 133bfb8 is described below commit 133bfb8020ebc50fe712f0745e961c5dea51f072 Author: Congling Xia <xiacongl...@xiaomi.com> AuthorDate: Mon Jul 26 11:05:42 2021 +0800 KYLIN-5029 set metrics refresh interval to a smaller value to make sure tests always passed (#1683) * KYLIN-5029 set metrics refresh interval to a smaller value to make sure tests always passed * refine --- .../apache/kylin/rest/metrics/QueryMetricsTest.java | 4 ++-- .../test/resources/hadoop-metrics2-kylin.properties | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/apache/kylin/rest/metrics/QueryMetricsTest.java b/server/src/test/java/org/apache/kylin/rest/metrics/QueryMetricsTest.java index 455180a..8c69198 100644 --- a/server/src/test/java/org/apache/kylin/rest/metrics/QueryMetricsTest.java +++ b/server/src/test/java/org/apache/kylin/rest/metrics/QueryMetricsTest.java @@ -81,7 +81,7 @@ public class QueryMetricsTest extends ServiceTestBase { QueryMetricsFacade.updateMetrics("", sqlRequest, sqlResponse); - Thread.sleep(10000); + Thread.sleep(2000); Assert.assertEquals(1L, mBeanServer.getAttribute(objectName, "QueryCount")); Assert.assertEquals(1L, mBeanServer.getAttribute(objectName, "QuerySuccessCount")); @@ -110,7 +110,7 @@ public class QueryMetricsTest extends ServiceTestBase { QueryMetricsFacade.updateMetrics("", sqlRequest, sqlResponse2); - Thread.sleep(10000); + Thread.sleep(2000); Assert.assertEquals(2L, mBeanServer.getAttribute(objectName, "QueryCount")); Assert.assertEquals(1L, mBeanServer.getAttribute(objectName, "QuerySuccessCount")); diff --git a/server/src/test/resources/hadoop-metrics2-kylin.properties b/server/src/test/resources/hadoop-metrics2-kylin.properties new file mode 100644 index 0000000..dfe1541 --- /dev/null +++ b/server/src/test/resources/hadoop-metrics2-kylin.properties @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kylin.period=1