001/** 002 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license 003 * agreements. See the NOTICE file distributed with this work for additional information regarding 004 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the 005 * "License"); you may not use this file except in compliance with the License. You may obtain a 006 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 007 * law or agreed to in writing, software distributed under the License is distributed on an "AS IS" 008 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License 009 * for the specific language governing permissions and limitations under the License. 010 */ 011package org.apache.hadoop.hbase.master.procedure; 012 013import org.apache.hadoop.hbase.HBaseClassTestRule; 014import org.apache.hadoop.hbase.testclassification.LargeTests; 015import org.apache.hadoop.hbase.testclassification.MasterTests; 016import org.junit.ClassRule; 017import org.junit.experimental.categories.Category; 018 019@Category({ MasterTests.class, LargeTests.class }) 020public class TestSCPWithReplicas extends TestSCP { 021 022 @ClassRule 023 public static final HBaseClassTestRule CLASS_RULE = 024 HBaseClassTestRule.forClass(TestSCPWithReplicas.class); 025 026 @Override 027 protected void startMiniCluster() throws Exception { 028 // Start a cluster with 4 nodes because we have 3 replicas. 029 // So on a crash of a server still we can ensure that the 030 // replicas are distributed. 031 this.util.startMiniCluster(4); 032 } 033 034 @Override 035 protected int getRegionReplication() { 036 return 3; 037 } 038}