Package org.apache.hadoop.hbase
Class TableNameTestRule
java.lang.Object
org.junit.rules.TestWatcher
org.apache.hadoop.hbase.TableNameTestRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Returns a
TableName
based on currently running test method name. Supports tests built on
the Parameterized
runner.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
cleanUpTestName
(String methodName) Helper to handle parameterized method names.org.apache.hadoop.hbase.TableName
protected void
starting
(org.junit.runner.Description description) Methods inherited from class org.junit.rules.TestWatcher
apply, failed, finished, skipped, skipped, succeeded
-
Field Details
-
tableName
-
-
Constructor Details
-
TableNameTestRule
public TableNameTestRule()
-
-
Method Details
-
starting
- Overrides:
starting
in classorg.junit.rules.TestWatcher
-
cleanUpTestName
Helper to handle parameterized method names. Unlike regular test methods, parameterized method names look like 'foo[x]'. This is problematic for tests that use this name for HBase tables. This helper strips out the parameter suffixes.- Returns:
- current test method name with out parameterized suffixes.
-
getTableName
-