Copilot commented on code in PR #7996:
URL: https://github.com/apache/hbase/pull/7996#discussion_r3026416009


##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java:
##########
@@ -390,22 +389,22 @@ private static void validateHFiles(FileSystem fs, String 
outputPath, String fami
       String[] elements = cfStatus.getPath().toString().split(Path.SEPARATOR);
       String cf = elements[elements.length - 1];
       foundFamilies.add(cf);
-      assertTrue(String.format(
-        "HFile ouput contains a column family (%s) not present in input 
families (%s)", cf,
-        configFamilies), configFamilies.contains(cf));
+      assertTrue(configFamilies.contains(cf),
+        String.format(
+          "HFile ouput contains a column family (%s) not present in input 
families (%s)", cf,
+          configFamilies));

Review Comment:
   Typo in the assertion message: "HFile ouput contains..." should be "HFile 
output contains...".



##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java:
##########
@@ -536,25 +522,25 @@ private static void validateHFiles(FileSystem fs, String 
outputPath, String fami
       String[] elements = cfStatus.getPath().toString().split(Path.SEPARATOR);
       String cf = elements[elements.length - 1];
       foundFamilies.add(cf);
-      assertTrue(String.format(
-        "HFile output contains a column family (%s) not present in input 
families (%s)", cf,
-        configFamilies), configFamilies.contains(cf));
+      assertTrue(configFamilies.contains(cf),
+        String.format(
+          "HFile output contains a column family (%s) not present in input 
families (%s)", cf,
+          configFamilies));
       for (FileStatus hfile : fs.listStatus(cfStatus.getPath())) {
-        assertTrue(String.format("HFile %s appears to contain no data.", 
hfile.getPath()),
-          hfile.getLen() > 0);
+        assertTrue(hfile.getLen() > 0,
+          String.format("HFile %s appears to contain no data.", 
hfile.getPath()));
         // count the number of KVs from all the hfiles
         if (expectedKVCount > -1) {
           actualKVCount += getKVCountFromHfile(fs, hfile.getPath());
         }
       }
     }
-    assertTrue(String.format("HFile output does not contain the input family 
'%s'.", family),
-      foundFamilies.contains(family));
+    assertTrue(foundFamilies.contains(family),
+      String.format("HFile output does not contain the input family '%s'.", 
family));
     if (expectedKVCount > -1) {
-      assertTrue(
+      assertTrue(actualKVCount == expectedKVCount,
         String.format("KV count in ouput hfile=<%d> doesn't match with 
expected KV count=<%d>",
-          actualKVCount, expectedKVCount),
-        actualKVCount == expectedKVCount);
+          actualKVCount, expectedKVCount));

Review Comment:
   Typo in the assertion message: "KV count in ouput hfile" should be "KV count 
in output hfile".



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to