HBASE-14516 categorize hadoop-compat tests
* make sure the test classifications are in test scope for their use in the hadoop-compat modules * added a test category for 'metrics related' since that's what all these tests are for * categorized tests as small,metrics
This commit is contained in:
parent
3b8039ed0f
commit
a545d71295
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tag a test that covers our metrics handling
|
||||
*/
|
||||
package org.apache.hadoop.hbase.testclassification;
|
||||
|
||||
public interface MetricsTests {
|
||||
}
|
|
@ -107,6 +107,12 @@
|
|||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-annotations</artifactId>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- General dependencies -->
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -26,11 +26,16 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestCompatibilitySingletonFactory {
|
||||
|
||||
private static final int ITERATIONS = 100000;
|
||||
|
|
|
@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.master;
|
|||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.master.MetricsMasterSource;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
* Test for the CompatibilitySingletonFactory and building MetricsMasterSource
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsMasterSourceFactory {
|
||||
|
||||
@Test(expected=RuntimeException.class)
|
||||
|
|
|
@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.regionserver;
|
|||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
* Test for the CompatibilitySingletonFactory and building MetricsRegionServerSource
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsRegionServerSourceFactory {
|
||||
|
||||
@Test(expected=RuntimeException.class)
|
||||
|
|
|
@ -19,8 +19,12 @@
|
|||
package org.apache.hadoop.hbase.regionserver.wal;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsWALSource {
|
||||
|
||||
@Test(expected=RuntimeException.class)
|
||||
|
|
|
@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.replication.regionserver;
|
|||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
* Test for the CompatibilitySingletonFactory and building MetricsReplicationSource
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsReplicationSourceFactory {
|
||||
|
||||
@Test(expected=RuntimeException.class)
|
||||
|
|
|
@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.rest;
|
|||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.rest.MetricsRESTSource;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
* Test of Rest Metrics Source interface.
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsRESTSource {
|
||||
|
||||
|
||||
|
|
|
@ -19,12 +19,16 @@
|
|||
package org.apache.hadoop.hbase.thrift;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
* Test for the interface of MetricsThriftServerSourceFactory
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsThriftServerSourceFactory {
|
||||
|
||||
|
||||
|
|
|
@ -150,6 +150,12 @@ limitations under the License.
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-annotations</artifactId>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-hadoop-compat</artifactId>
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
package org.apache.hadoop.hbase.master;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
@ -27,6 +30,7 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* Test for MetricsMasterSourceImpl
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsMasterSourceImpl {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -18,10 +18,13 @@
|
|||
|
||||
package org.apache.hadoop.hbase.metrics;
|
||||
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.apache.hadoop.metrics2.lib.MutableCounterLong;
|
||||
import org.apache.hadoop.metrics2.lib.MutableGaugeLong;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
@ -29,6 +32,7 @@ import static org.junit.Assert.assertNull;
|
|||
/**
|
||||
* Test of default BaseSource for hadoop 2
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestBaseSourceImpl {
|
||||
|
||||
private static BaseSourceImpl bmsi;
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
package org.apache.hadoop.hbase.regionserver;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
@ -27,6 +30,7 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* Test for MetricsRegionServerSourceImpl
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsRegionServerSourceImpl {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -26,8 +26,12 @@ import java.util.Map;
|
|||
|
||||
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsRegionSourceImpl {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -18,11 +18,15 @@
|
|||
package org.apache.hadoop.hbase.regionserver.wal;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsWALSourceImpl {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -18,10 +18,14 @@
|
|||
package org.apache.hadoop.hbase.replication.regionserver;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsReplicationSourceFactoryImpl {
|
||||
|
||||
|
||||
|
|
|
@ -21,10 +21,14 @@ package org.apache.hadoop.hbase.replication.regionserver;
|
|||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
|
||||
import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceImpl;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
/** Test for MetricsReplicationSourceImpl */
|
||||
public class TestMetricsReplicationSourceImpl {
|
||||
|
||||
|
|
|
@ -21,7 +21,10 @@ package org.apache.hadoop.hbase.rest;
|
|||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.rest.MetricsRESTSource;
|
||||
import org.apache.hadoop.hbase.rest.MetricsRESTSourceImpl;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
@ -29,6 +32,7 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* Test for hadoop 2's version of MetricsRESTSource
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsRESTSourceImpl {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -19,9 +19,12 @@
|
|||
package org.apache.hadoop.hbase.thrift;
|
||||
|
||||
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MetricsTests;
|
||||
import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory;
|
||||
import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactoryImpl;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
@ -30,6 +33,7 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* Test for hadoop 2's version of MetricsThriftServerSourceFactory
|
||||
*/
|
||||
@Category({MetricsTests.class, SmallTests.class})
|
||||
public class TestMetricsThriftServerSourceFactoryImpl {
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue