Class MiniClusterRule

java.lang.Object
org.junit.rules.ExternalResource
org.apache.hadoop.hbase.MiniClusterRule
All Implemented Interfaces:
org.junit.rules.TestRule

@Deprecated public final class MiniClusterRule extends org.junit.rules.ExternalResource
Deprecated.
Use MiniClusterExtension instead, Once we finish the migration of JUnit5, which means we do not need MiniClusterRule any more, we can remove these dependencies, see HBASE-23671 for more details.
A TestRule that manages an instance of the SingleProcessHBaseCluster. Can be used in either the Rule or ClassRule positions. Built on top of an instance of HBaseTestingUtil, so be weary of intermixing direct use of that class with this Rule.

Use in combination with ConnectionRule, for example:
 {
   @code
   public class TestMyClass {
     @ClassRule
     public static final MiniClusterRule miniClusterRule = MiniClusterRule.newBuilder().build();

     @Rule
     public final ConnectionRule connectionRule =
       ConnectionRule.createAsyncConnectionRule(miniClusterRule::createAsyncConnection);
   }
 }