Package org.apache.hadoop.hbase
Class TestChoreService
java.lang.Object
org.apache.hadoop.hbase.TestChoreService
@Tag("org.apache.hadoop.hbase.testclassification.MiscTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestChoreService
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classLightweight ScheduledChore used primarily to fill the scheduling queue in testsstatic classA Chore that will try to execute the initial chore a few times before succeeding.private static classStraight forward stopper implementation that is used by default when one is not providedprivate static classprivate static classSleeps for longer than the scheduled period. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp(org.junit.jupiter.api.TestInfo testInfo) voidshutdownService(org.apache.hadoop.hbase.ChoreService service) voidtearDown()voidvoidtestChangingChoreServices(org.junit.jupiter.api.TestInfo testInfo) voidvoidvoidvoidvoidvoidvoidvoidvoidfor HBASE-25014voidChoreServices should never have a core pool size that exceeds the number of chores that have been scheduled with the service.voidvoidvoidvoidvoidvoidvoid
-
Field Details
-
LOG
-
CONF
-
initialCorePoolSize
-
service
-
testName
-
-
Constructor Details
-
TestChoreService
public TestChoreService()
-
-
Method Details
-
setUp
-
tearDown
-
testInitialChorePrecedence
- Throws:
InterruptedException
-
testCancelChore
- Throws:
InterruptedException
-
testScheduledChoreConstruction
-
testChoreServiceConstruction
- Throws:
InterruptedException
-
testFrequencyOfChores
- Throws:
InterruptedException
-
shutdownService
-
testForceTrigger
- Throws:
InterruptedException
-
testCorePoolIncrease
- Throws:
InterruptedException
-
testCorePoolDecrease
- Throws:
InterruptedException
-
testNumberOfRunningChores
- Throws:
InterruptedException
-
testNumberOfChoresMissingStartTime
- Throws:
InterruptedException
-
testMaximumChoreServiceThreads
ChoreServices should never have a core pool size that exceeds the number of chores that have been scheduled with the service. For example, if 4 ScheduledChores are scheduled with a ChoreService, the number of threads in the ChoreService's core pool should never exceed 4- Throws:
InterruptedException
-
testChangingChoreServices
@Test public void testChangingChoreServices(org.junit.jupiter.api.TestInfo testInfo) throws InterruptedException - Throws:
InterruptedException
-
testStopperForScheduledChores
- Throws:
InterruptedException
-
testShutdownCancelsScheduledChores
- Throws:
InterruptedException
-
testShutdownWorksWhileChoresAreExecuting
- Throws:
InterruptedException
-
testShutdownRejectsNewSchedules
- Throws:
InterruptedException
-
testInitialDelay
for HBASE-25014 -
testCleanupWithStopper
-
testCleanupWithShutdown
-