use of org.apache.hadoop.hbase.HBaseCommonTestingUtil in project hbase by apache.
the class TestRegionNormalizerWorker method before.
@Before
public void before() throws Exception {
MockitoAnnotations.initMocks(this);
when(masterServices.skipRegionManagementAction(any())).thenReturn(false);
testingUtility = new HBaseCommonTestingUtil();
queue = new RegionNormalizerWorkQueue<>();
workerThreadThrowable.set(null);
final String threadNameFmt = TestRegionNormalizerWorker.class.getSimpleName() + "-" + testName.getMethodName() + "-%d";
final ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat(threadNameFmt).setDaemon(true).setUncaughtExceptionHandler((t, e) -> workerThreadThrowable.set(e)).build();
workerPool = Executors.newSingleThreadExecutor(threadFactory);
}
Aggregations