You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2020/06/17 10:04:00 UTC

[hbase-operator-tools] branch master updated: Revert "HBASE-23927 hbck2 assigns command should accept a file containing a list of region names - amend to put test input file in test data dir #66" (#67)

This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cff00d  Revert "HBASE-23927 hbck2 assigns command should accept a file containing a list of region names - amend to put test input file in test data dir #66" (#67)
4cff00d is described below

commit 4cff00d92af1f06639050fac6cab1b5892c87ccb
Author: Wellington Ramos Chevreuil <we...@gmail.com>
AuthorDate: Wed Jun 17 11:03:51 2020 +0100

    Revert "HBASE-23927 hbck2 assigns command should accept a file containing a list of region names - amend to put test input file in test data dir #66" (#67)
    
    This reverts commit cb034317ba5c5a8b3e8c2cb8ef901bceef954f27.
---
 hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java b/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
index ca3caca..c120c98 100644
--- a/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
+++ b/hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -150,13 +149,13 @@ public class TestHBCK2 {
 
         // test input files
         unassigns(regions, regionStrsArray);
-        File testFile = new File(TEST_UTIL.getDataTestDir().toString(), "inputForAssignsTest");
-        try (FileOutputStream output = new FileOutputStream(testFile, false)) {
-          for (String regionStr : regionStrsArray) {
-            output.write((regionStr + System.lineSeparator()).getBytes());
-          }
+        String testFile = "inputForAssignsTest";
+        FileOutputStream output = new FileOutputStream(testFile, false);
+        for (String regionStr : regionStrsArray) {
+          output.write((regionStr + System.lineSeparator()).getBytes());
         }
-        String result = testRunWithArgs(new String[]{ASSIGNS, "-i", testFile.toString()});
+        output.close();
+        String result = testRunWithArgs(new String[] {ASSIGNS, "-i", testFile});
         Scanner scanner = new Scanner(result).useDelimiter("[\\D]+");
         pids = new ArrayList<>();
         while (scanner.hasNext()) {