ndimiduk commented on a change in pull request #1032: HBASE-23665: Split unit 
tests from TestTableName into a separate test…
URL: https://github.com/apache/hbase/pull/1032#discussion_r366519224
 
 

 ##########
 File path: 
hbase-common/src/test/java/org/apache/hadoop/hbase/TestTableName.java
 ##########
 @@ -172,9 +108,52 @@ public int hashCode() {
     new Names("n2", "table2")
   };
 
+  @Test(expected = IllegalArgumentException.class)
+  public void testInvalidNamespace() {
+    for (String tn : invalidNamespace) {
 
 Review comment:
   I know this isn't your code, but since you're here... this only tests the 
first value in `invalidNamespace`. What you need is something like
   
   ```
   for (final String tn : invalidNamespace) {
     Assert.assertThrows(IllegalArgumentException.class, () -> 
TableName.isLegalFullyQualifiedTableName(Bytes.toBytes(tn)));
   }
   ```
   
   A bunch of these tests appear to make this mistake.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to