Package org.apache.hadoop.hbase
Class ResourceCheckerJUnitListener
java.lang.Object
org.junit.runner.notification.RunListener
org.apache.hadoop.hbase.ResourceCheckerJUnitListener
Listen to the test progress and check the usage of:
- threads
- open file descriptor
- max open file descriptor
When surefire forkMode=once/always/perthread, this code is executed on the forked process.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidTo be implemented by sub classes if they want to add specific ResourceAnalyzer.private StringdescriptionToShortTestName(org.junit.runner.Description description) Get the test name from the JUnit Descriptionprivate voidprivate voidvoidtestFinished(org.junit.runner.Description description) voidtestStarted(org.junit.runner.Description description) Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure, testFailure, testIgnored, testRunFinished, testRunStarted, testSuiteFinished, testSuiteStarted
-
Field Details
-
rcs
-
-
Constructor Details
-
ResourceCheckerJUnitListener
public ResourceCheckerJUnitListener()
-
-
Method Details
-
addResourceAnalyzer
To be implemented by sub classes if they want to add specific ResourceAnalyzer. -
start
-
end
-
descriptionToShortTestName
Get the test name from the JUnit Description- Returns:
- the string for the short test name
-
testStarted
- Overrides:
testStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testFinished
- Overrides:
testFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-