HBASE-23126: Removing the un-used integration test class - IntegrationTestRSGroup

Closes #1936

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Sandeep Pal 2020-06-20 22:38:15 +05:30 committed by Viraj Jasani
parent 3c31981179
commit f22c7a6583
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
1 changed files with 0 additions and 99 deletions

View File

@ -1,99 +0,0 @@
/**
* Copyright The Apache Software Foundation
*
* 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.
*/
package org.apache.hadoop.hbase.rsgroup;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.IntegrationTestingUtility;
import org.apache.hadoop.hbase.Waiter;
import org.apache.hadoop.hbase.testclassification.IntegrationTests;
import org.junit.After;
import org.junit.Before;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Runs all of the units tests defined in TestGroupBase as an integration test.
* Requires TestRSGroupBase.NUM_SLAVE_BASE servers to run.
*/
@Category(IntegrationTests.class)
public class IntegrationTestRSGroup extends TestRSGroupsBase {
private final static Logger LOG = LoggerFactory.getLogger(IntegrationTestRSGroup.class);
private static boolean initialized = false;
@Before
public void beforeMethod() throws Exception {
if (!initialized) {
LOG.info("Setting up IntegrationTestRSGroup");
LOG.info("Initializing cluster with " + NUM_SLAVES_BASE + " servers");
TEST_UTIL = new IntegrationTestingUtility();
TEST_UTIL.getConfiguration().set(HConstants.HBASE_MASTER_LOADBALANCER_CLASS,
RSGroupBasedLoadBalancer.class.getName());
RSGroupUtil.enableRSGroup(TEST_UTIL.getConfiguration());
((IntegrationTestingUtility) TEST_UTIL).initializeCluster(NUM_SLAVES_BASE);
// set shared configs
ADMIN = TEST_UTIL.getAdmin();
CLUSTER = TEST_UTIL.getHBaseClusterInterface();
LOG.info("Done initializing cluster");
initialized = true;
// cluster may not be clean
// cleanup when initializing
afterMethod();
}
}
@After
public void afterMethod() throws Exception {
LOG.info("Cleaning up previous test run");
//cleanup previous artifacts
deleteTableIfNecessary();
deleteNamespaceIfNecessary();
deleteGroups();
ADMIN.balancerSwitch(true, true);
LOG.info("Restoring the cluster");
((IntegrationTestingUtility)TEST_UTIL).restoreCluster();
LOG.info("Done restoring the cluster");
TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {
@Override
public boolean evaluate() throws Exception {
LOG.info("Waiting for cleanup to finish "+ ADMIN.listRSGroups());
//Might be greater since moving servers back to default
//is after starting a server
return ADMIN.getRSGroup(RSGroupInfo.DEFAULT_GROUP).getServers().size()
>= NUM_SLAVES_BASE;
}
});
TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {
@Override
public boolean evaluate() throws Exception {
LOG.info("Waiting for regionservers to be registered "+ ADMIN.listRSGroups());
//Might be greater since moving servers back to default
//is after starting a server
return ADMIN.getRSGroup(RSGroupInfo.DEFAULT_GROUP).getServers().size()
== getNumServers();
}
});
LOG.info("Done cleaning up previous test run");
}
}