This is an automated email from the ASF dual-hosted git repository.
avijayan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2eea69a AMBARI-23438 : Fix failing metrics unit tests on trunk.
2eea69a is described below
commit 2eea69aca7015cf1c5361aaa66994bbb93eb3583
Author: Aravindan Vijayan <[email protected]>
AuthorDate: Fri Apr 13 21:41:40 2018 -0700
AMBARI-23438 : Fix failing metrics unit tests on trunk.
---
ambari-metrics/ambari-metrics-common/pom.xml | 9 --
.../cache/TimelineMetricsEhCacheSizeOfEngine.java | 136 ---------------------
.../ambari-metrics-timelineservice/pom.xml | 5 +
.../cache/InternalMetricsCacheSizeOfEngine.java | 102 +++++++++++++++-
.../timeline/source/RawMetricsSourceTest.java | 2 -
.../internal/StackDefinedPropertyProviderTest.java | 4 -
.../metrics/timeline/AMSPropertyProviderTest.java | 82 +++++++++----
.../timeline/AMSReportPropertyProviderTest.java | 3 -
8 files changed, 159 insertions(+), 184 deletions(-)
diff --git a/ambari-metrics/ambari-metrics-common/pom.xml
b/ambari-metrics/ambari-metrics-common/pom.xml
index af68ed9..872e2b4 100644
--- a/ambari-metrics/ambari-metrics-common/pom.xml
+++ b/ambari-metrics/ambari-metrics-common/pom.xml
@@ -110,10 +110,6 @@
<shadedPattern>org.apache.ambari.metrics.sink.relocated.jboss</shadedPattern>
</relocation>
<relocation>
- <pattern>net.sf.ehcache</pattern>
-
<shadedPattern>org.apache.ambari.metrics.sink.relocated.ehcache</shadedPattern>
- </relocation>
- <relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>org.apache.hadoop.metrics2.sink.relocated.apache.http</shadedPattern>
</relocation>
@@ -137,11 +133,6 @@
<dependencies>
<dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- <version>2.10.0</version>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
diff --git
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsEhCacheSizeOfEngine.java
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsEhCacheSizeOfEngine.java
deleted file mode 100644
index 0e4871b..0000000
---
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/cache/TimelineMetricsEhCacheSizeOfEngine.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
- */
-package org.apache.hadoop.metrics2.sink.timeline.cache;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
-import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.sf.ehcache.Element;
-import net.sf.ehcache.pool.Size;
-import net.sf.ehcache.pool.SizeOfEngine;
-import net.sf.ehcache.pool.impl.DefaultSizeOfEngine;
-import net.sf.ehcache.pool.sizeof.ReflectionSizeOf;
-import net.sf.ehcache.pool.sizeof.SizeOf;
-
-/**
- * Cache sizing engine that reduces reflective calls over the Object graph to
- * find total Heap usage. Used for ehcache based on available memory.
- */
-public abstract class TimelineMetricsEhCacheSizeOfEngine implements
SizeOfEngine {
- private final static Logger LOG =
LoggerFactory.getLogger(TimelineMetricsEhCacheSizeOfEngine.class);
-
- private static int DEFAULT_MAX_DEPTH = 1000;
- private static boolean DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED = false;
-
- // Base Engine
- protected SizeOfEngine underlying = null;
-
- // Counter
- protected SizeOf reflectionSizeOf = new ReflectionSizeOf();
-
- // Optimizations
- private volatile long timelineMetricPrimitivesApproximation = 0;
-
- // Map entry sizing
- private long sizeOfMapEntry;
- private long sizeOfMapEntryOverhead;
- private long sizeOfElement;
-
- protected TimelineMetricsEhCacheSizeOfEngine(SizeOfEngine underlying) {
- this.underlying = underlying;
- }
-
- public TimelineMetricsEhCacheSizeOfEngine() {
- this(new DefaultSizeOfEngine(DEFAULT_MAX_DEPTH,
DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED));
-
- this.sizeOfMapEntry = reflectionSizeOf.sizeOf(new Long(1)) +
- reflectionSizeOf.sizeOf(new Double(2.0));
-
- this.sizeOfElement = reflectionSizeOf.sizeOf(new Element(new Object(), new
Object()));
-
- //SizeOfMapEntryOverhead = SizeOfMapWithOneEntry - (SizeOfEmptyMap +
SizeOfOneEntry)
- TreeMap<Long, Double> map = new TreeMap<>();
- long emptyMapSize = reflectionSizeOf.sizeOf(map);
- map.put(new Long(1), new Double(2.0));
- long sizeOfMapOneEntry = reflectionSizeOf.deepSizeOf(DEFAULT_MAX_DEPTH,
DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED, map).getCalculated();
- this.sizeOfMapEntryOverhead = sizeOfMapOneEntry - (emptyMapSize +
this.sizeOfMapEntry);
-
- LOG.info("Creating custom sizeof engine for TimelineMetrics.");
- }
-
- /**
- * Return size of the metrics TreeMap in an optimized way.
- *
- */
- protected long getTimelineMetricsSize(TimelineMetrics metrics) {
- long size = 8; // Object reference
-
- if (metrics != null) {
- for (TimelineMetric metric : metrics.getMetrics()) {
-
- if (timelineMetricPrimitivesApproximation == 0) {
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getMetricName());
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getAppId());
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getHostName());
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getInstanceId());
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getStartTime());
- timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getType());
- timelineMetricPrimitivesApproximation += 8; // Object overhead
-
- LOG.debug("timelineMetricPrimitivesApproximation bytes = " +
timelineMetricPrimitivesApproximation);
- }
- size += timelineMetricPrimitivesApproximation;
- size += getValueMapSize(metric.getMetricValues());
- }
- LOG.debug("Total Size of metric values in cache: " + size);
- }
- return size;
- }
-
- protected long getValueMapSize(Map<Long, Double> metricValues) {
- long size = 0;
- if (metricValues != null && !metricValues.isEmpty()) {
- // Numeric wrapper: 12 bytes + 8 bytes Data type + 4 bytes alignment =
48 (Long, Double)
- // Tree Map: 12 bytes for header + 20 bytes for 5 object fields :
pointers + 1 byte for flag = 40
- LOG.debug("Size of metric value: " + (sizeOfMapEntry +
sizeOfMapEntryOverhead) * metricValues.size());
- size += (sizeOfMapEntry + sizeOfMapEntryOverhead) * metricValues.size();
// Treemap size is O(1)
- }
- return size;
- }
-
- // Get size of the Cache entry for final size calculation
- protected abstract long getSizeOfEntry(Object key, Object value);
-
- @Override
- public Size sizeOf(Object key, Object value, Object container) {
- return new Size(sizeOfElement + getSizeOfEntry(key, value), false);
- }
-
- @Override
- public SizeOfEngine copyWith(int maxDepth, boolean
abortWhenMaxDepthExceeded) {
- LOG.debug("Copying tracing sizeof engine, maxdepth: {}, abort: {}",
maxDepth, abortWhenMaxDepthExceeded);
-
- return underlying.copyWith(maxDepth, abortWhenMaxDepthExceeded);
- }
-
-}
diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml
b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
index 56a56e5..2cc335d 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml
+++ b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
@@ -763,6 +763,11 @@
<artifactId>ignite-log4j</artifactId>
<version>2.1.0</version>
</dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>2.10.0</version>
+ </dependency>
</dependencies>
<profiles>
diff --git
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/cache/InternalMetricsCacheSizeOfEngine.java
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/cache/InternalMetricsCacheSizeOfEngine.java
index e36c981..cf19e91 100644
---
a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/cache/InternalMetricsCacheSizeOfEngine.java
+++
b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/cache/InternalMetricsCacheSizeOfEngine.java
@@ -17,18 +17,114 @@
*/
package
org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.source.cache;
-import
org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsEhCacheSizeOfEngine;
+import net.sf.ehcache.Element;
+import net.sf.ehcache.pool.Size;
+import net.sf.ehcache.pool.SizeOfEngine;
+import net.sf.ehcache.pool.impl.DefaultSizeOfEngine;
+import net.sf.ehcache.pool.sizeof.ReflectionSizeOf;
+import net.sf.ehcache.pool.sizeof.SizeOf;
+import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
+import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class InternalMetricsCacheSizeOfEngine extends
TimelineMetricsEhCacheSizeOfEngine {
+import java.util.Map;
+import java.util.TreeMap;
+
+public class InternalMetricsCacheSizeOfEngine implements SizeOfEngine {
private final static Logger LOG =
LoggerFactory.getLogger(InternalMetricsCacheSizeOfEngine.class);
+ private static int DEFAULT_MAX_DEPTH = 1000;
+ private static boolean DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED = false;
+
+ // Base Engine
+ protected SizeOfEngine underlying = null;
+
+ // Counter
+ protected SizeOf reflectionSizeOf = new ReflectionSizeOf();
+
+ // Optimizations
+ private volatile long timelineMetricPrimitivesApproximation = 0;
+
+ // Map entry sizing
+ private long sizeOfMapEntry;
+ private long sizeOfMapEntryOverhead;
+ private long sizeOfElement;
+
+ protected InternalMetricsCacheSizeOfEngine(SizeOfEngine underlying) {
+ this.underlying = underlying;
+ }
+
public InternalMetricsCacheSizeOfEngine() {
- // Invoke default constructor in base class
+ this(new DefaultSizeOfEngine(DEFAULT_MAX_DEPTH,
DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED));
+
+ this.sizeOfMapEntry = reflectionSizeOf.sizeOf(new Long(1)) +
+ reflectionSizeOf.sizeOf(new Double(2.0));
+
+ this.sizeOfElement = reflectionSizeOf.sizeOf(new Element(new Object(), new
Object()));
+
+ //SizeOfMapEntryOverhead = SizeOfMapWithOneEntry - (SizeOfEmptyMap +
SizeOfOneEntry)
+ TreeMap<Long, Double> map = new TreeMap<>();
+ long emptyMapSize = reflectionSizeOf.sizeOf(map);
+ map.put(new Long(1), new Double(2.0));
+ long sizeOfMapOneEntry = reflectionSizeOf.deepSizeOf(DEFAULT_MAX_DEPTH,
DEFAULT_ABORT_WHEN_MAX_DEPTH_EXCEEDED, map).getCalculated();
+ this.sizeOfMapEntryOverhead = sizeOfMapOneEntry - (emptyMapSize +
this.sizeOfMapEntry);
+
+ LOG.info("Creating custom sizeof engine for TimelineMetrics.");
+ }
+
+ /**
+ * Return size of the metrics TreeMap in an optimized way.
+ *
+ */
+ protected long getTimelineMetricsSize(TimelineMetrics metrics) {
+ long size = 8; // Object reference
+
+ if (metrics != null) {
+ for (TimelineMetric metric : metrics.getMetrics()) {
+
+ if (timelineMetricPrimitivesApproximation == 0) {
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getMetricName());
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getAppId());
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getHostName());
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getInstanceId());
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getStartTime());
+ timelineMetricPrimitivesApproximation +=
reflectionSizeOf.sizeOf(metric.getType());
+ timelineMetricPrimitivesApproximation += 8; // Object overhead
+
+ LOG.debug("timelineMetricPrimitivesApproximation bytes = " +
timelineMetricPrimitivesApproximation);
+ }
+ size += timelineMetricPrimitivesApproximation;
+ size += getValueMapSize(metric.getMetricValues());
+ }
+ LOG.debug("Total Size of metric values in cache: " + size);
+ }
+ return size;
+ }
+
+ protected long getValueMapSize(Map<Long, Double> metricValues) {
+ long size = 0;
+ if (metricValues != null && !metricValues.isEmpty()) {
+ // Numeric wrapper: 12 bytes + 8 bytes Data type + 4 bytes alignment =
48 (Long, Double)
+ // Tree Map: 12 bytes for header + 20 bytes for 5 object fields :
pointers + 1 byte for flag = 40
+ LOG.debug("Size of metric value: " + (sizeOfMapEntry +
sizeOfMapEntryOverhead) * metricValues.size());
+ size += (sizeOfMapEntry + sizeOfMapEntryOverhead) * metricValues.size();
// Treemap size is O(1)
+ }
+ return size;
+ }
+
+ @Override
+ public Size sizeOf(Object key, Object value, Object container) {
+ return new Size(sizeOfElement + getSizeOfEntry(key, value), false);
}
@Override
+ public SizeOfEngine copyWith(int maxDepth, boolean
abortWhenMaxDepthExceeded) {
+ LOG.debug("Copying tracing sizeof engine, maxdepth: {}, abort: {}",
maxDepth, abortWhenMaxDepthExceeded);
+
+ return underlying.copyWith(maxDepth, abortWhenMaxDepthExceeded);
+ }
+
protected long getSizeOfEntry(Object key, Object value) {
try {
LOG.debug("BEGIN - Sizeof, key: {}, value: {}", key, value);
diff --git
a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/RawMetricsSourceTest.java
b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/RawMetricsSourceTest.java
index 78e4e23..e3be6f4 100644
---
a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/RawMetricsSourceTest.java
+++
b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/source/RawMetricsSourceTest.java
@@ -59,7 +59,6 @@ public class RawMetricsSourceTest {
replayAll();
}
- @Ignore
@Test
public void testRawMetricsSourcedAtFlushInterval() throws Exception {
InternalSourceProvider internalSourceProvider = new
DefaultInternalMetricsSourceProvider();
@@ -92,7 +91,6 @@ public class RawMetricsSourceTest {
verify(rawMetricsSink);
}
- @Ignore
@Test(timeout = 10000)
public void testRawMetricsCachedAndSourced() throws Exception {
ExternalMetricsSink rawMetricsSink =
createNiceMock(ExternalMetricsSink.class);
diff --git
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
index a018d48..2d4e25d 100644
---
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
+++
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
@@ -73,7 +73,6 @@ import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.springframework.security.core.context.SecurityContextHolder;
@@ -200,7 +199,6 @@ public class StackDefinedPropertyProviderTest {
H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
}
- @Ignore
@Test
public void testStackDefinedPropertyProviderAsClusterAdministrator() throws
Exception {
//Setup user with Role 'ClusterAdministrator'.
@@ -223,7 +221,6 @@ public class StackDefinedPropertyProviderTest {
testPopulateResourcesWithAggregateFunctionMetrics();
}
- @Ignore
@Test
public void testStackDefinedPropertyProviderAsAdministrator() throws
Exception {
//Setup user with Role 'Administrator'
@@ -246,7 +243,6 @@ public class StackDefinedPropertyProviderTest {
testPopulateResourcesWithAggregateFunctionMetrics();
}
- @Ignore
@Test
public void testStackDefinedPropertyProviderAsServiceAdministrator() throws
Exception {
//Setup user with 'ServiceAdministrator'
diff --git
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
index df06bb6..0ac9f80 100644
---
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
+++
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
@@ -72,7 +72,6 @@ import org.apache.http.client.utils.URIBuilder;
import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
@@ -113,7 +112,6 @@ public class AMSPropertyProviderTest {
// SecurityContextHolder.getContext().setAuthentication(null);
- @Ignore
@Test
public void testRbacForAMSPropertyProvider() throws Exception {
@@ -141,29 +139,69 @@ public class AMSPropertyProviderTest {
}
}
- @Ignore
+ @Test
public void testAMSPropertyProviderAsViewUser() throws Exception {
// Setup user with 'ViewUser'
// ViewUser doesn't have the 'CLUSTER_VIEW_METRICS', 'HOST_VIEW_METRICS'
and 'SERVICE_VIEW_METRICS', thus
// can't retrieve the Metrics.
SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createViewUser("ViewUser",
2L));
- testPopulateResourcesForSingleHostMetric();
- testPopulateResourcesForSingleHostMetricPointInTime();
- testPopulateResourcesForMultipleHostMetricscPointInTime();
- testPopulateResourcesForMultipleHostMetrics();
- testPopulateResourcesForRegexpMetrics();
- testPopulateResourcesForSingleComponentMetric();
- testPopulateMetricsForEmbeddedHBase();
- testAggregateFunctionForComponentMetrics();
- testFilterOutOfBandMetricData();
- testPopulateResourcesForHostComponentHostMetrics();
- testPopulateResourcesForHostComponentMetricsForMultipleHosts();
- testPopulateResourcesHostBatches();
- testPopulateResourcesForMultipleComponentsMetric();
+ try {
+ testPopulateResourcesForSingleHostMetric();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForSingleHostMetric();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForMultipleHostMetrics();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForSingleComponentMetric();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testAggregateFunctionForComponentMetrics();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForHostComponentHostMetrics();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForHostComponentMetricsForMultipleHosts();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesHostBatches();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
+ try {
+ testPopulateResourcesForMultipleComponentsMetric();
+ Assert.fail();
+ } catch (AuthorizationException ignored) {
+ }
+
}
- @Ignore
@Test
public void testPopulateResourcesForSingleHostMetric() throws Exception {
setUpCommonMocks();
@@ -210,7 +248,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(111, val.length);
}
- @Ignore
@Test
public void testPopulateResourcesForSingleHostMetricPointInTime() throws
Exception {
setUpCommonMocks();
@@ -258,7 +295,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(41.088, val, 0.001);
}
- @Ignore
@Test
public void testPopulateResourcesForMultipleHostMetricscPointInTime() throws
Exception {
setUpCommonMocks();
@@ -315,7 +351,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(2.47025664E8, val2, 0.1);
}
- @Ignore
@Test
public void testPopulateResourcesForMultipleHostMetrics() throws Exception {
setUpCommonMocks();
@@ -380,7 +415,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(86, val.length);
}
- @Ignore
@Test
public void testPopulateResourcesForRegexpMetrics() throws Exception {
setUpCommonMocks();
@@ -437,7 +471,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(238, val.length);
}
- @Ignore
@Test
public void testPopulateResourcesForSingleComponentMetric() throws Exception
{
setUpCommonMocks();
@@ -541,7 +574,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(2, allSpecs.size());
}
- @Ignore
@Test
public void testPopulateMetricsForEmbeddedHBase() throws Exception {
AmbariManagementController amc =
createNiceMock(AmbariManagementController.class);
@@ -622,7 +654,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(189, val.length);
}
- @Ignore
@Test
public void testAggregateFunctionForComponentMetrics() throws Exception {
AmbariManagementController amc =
createNiceMock(AmbariManagementController.class);
@@ -704,7 +735,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(32, val.length);
}
- @Ignore
@Test
public void testFilterOutOfBandMetricData() throws Exception {
setUpCommonMocks();
@@ -776,7 +806,6 @@ public class AMSPropertyProviderTest {
}
}
- @Ignore
@Test
public void testPopulateResourcesForHostComponentHostMetrics() throws
Exception {
setUpCommonMocks();
@@ -935,7 +964,6 @@ public class AMSPropertyProviderTest {
Assert.assertEquals(2, allSpecs.size());
}
- @Ignore
@Test
public void testPopulateResourcesForHostComponentMetricsForMultipleHosts()
throws Exception {
setUpCommonMocks();
diff --git
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
index c3a6ba1..8b6a64f 100644
---
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
+++
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
@@ -43,7 +43,6 @@ import
org.apache.ambari.server.controller.utilities.PropertyHelper;
import org.apache.http.client.utils.URIBuilder;
import org.junit.Assert;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
public class AMSReportPropertyProviderTest {
@@ -61,7 +60,6 @@ public class AMSReportPropertyProviderTest {
cacheProvider = new TimelineMetricCacheProvider(new Configuration(),
cacheEntryFactory);
}
- @Ignore
@Test
public void testPopulateResources() throws Exception {
TestStreamProvider streamProvider = new
TestStreamProvider(SINGLE_HOST_METRICS_FILE_PATH);
@@ -105,7 +103,6 @@ public class AMSReportPropertyProviderTest {
Assert.assertEquals(111, val.length);
}
- @Ignore
@Test
public void testPopulateResourceWithAggregateFunction() throws Exception {
TestStreamProvider streamProvider = new
TestStreamProvider(AGGREGATE_CLUSTER_METRICS_FILE_PATH);
--
To stop receiving notification emails like this one, please contact
[email protected].