saintstack commented on a change in pull request #954: HBASE-23305: Master
based registry implementation
URL: https://github.com/apache/hbase/pull/954#discussion_r360515941
##########
File path:
hbase-common/src/test/java/org/apache/hadoop/hbase/TestTableName.java
##########
@@ -51,7 +51,21 @@
*/
@Override
protected void starting(Description description) {
- tableName = TableName.valueOf(description.getMethodName());
+ tableName =
TableName.valueOf(cleanUpTestName(description.getMethodName()));
+ }
+
+ /**
+ * 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.
+ * @return current test method name with out parameterized suffixes.
+ */
+ private static String cleanUpTestName(String methodName) {
Review comment:
smile... yeah, this is a pain.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services