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
Modifier and TypeClassDescription(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
(package private) static class
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
To be implemented by sub classes if they want to add specific ResourceAnalyzer.private String
descriptionToShortTestName
(org.junit.runner.Description description) Get the test name from the JUnit Descriptionprivate void
private void
void
testFinished
(org.junit.runner.Description description) void
testStarted
(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:
testStarted
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testFinished
- Overrides:
testFinished
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-