clarax commented on code in PR #105:
URL: 
https://github.com/apache/hbase-operator-tools/pull/105#discussion_r847505966


##########
hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java:
##########
@@ -287,21 +359,39 @@ public void 
testFormatReportMissingRegionsInMetaNoMissing() throws IOException {
   public void testFormatReportMissingInMetaOneMissing() throws IOException {
     TableName tableName = createTestTable(5);
     List<RegionInfo> regions = HBCKMetaTableAccessor
-      .getTableRegions(TEST_UTIL.getConnection(), tableName);
+            .getTableRegions(TEST_UTIL.getConnection(), tableName);
     HBCKMetaTableAccessor.deleteRegionInfo(TEST_UTIL.getConnection(), 
regions.get(0));
     String expectedResult = "Missing Regions for each table:\n";
     String result = testFormatMissingRegionsInMetaReport();
     //validates initial report message
     assertTrue(result.contains(expectedResult));
     //validates our test table region is reported missing
     expectedResult = "\t" + tableName.getNameAsString() + "->\n\t\t"
-      + regions.get(0).getEncodedName();
+            + regions.get(0).getEncodedName();
     assertTrue(result.contains(expectedResult));
     //validates namespace region is not reported missing
     expectedResult = "\n\thbase:namespace -> No mismatching regions. This 
table is good!\n\t";
     assertTrue(result.contains(expectedResult));
   }
 
+  private void writeStringsToAFile(File testFile, String[] strs) throws 
IOException {
+    try (FileOutputStream output = new FileOutputStream(testFile, false)) {
+      for (String regionStr : strs) {
+        output.write((regionStr + System.lineSeparator()).getBytes());
+      }
+    }
+  }
+
+  private List<Long> getPidsFromResult(String result) {
+    Scanner scanner = new Scanner(result).useDelimiter("[\\D]+");
+    List<Long> pids = new ArrayList<>();
+    while (scanner.hasNext()) {
+      pids.add(scanner.nextLong());
+    }
+    scanner.close();

Review Comment:
   I can update. This is existing code.



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