You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2012/06/01 22:43:34 UTC

svn commit: r1345343 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java

Author: stack
Date: Fri Jun  1 20:43:33 2012
New Revision: 1345343

URL: http://svn.apache.org/viewvc?rev=1345343&view=rev
Log:
HBASE-6149 Fix TestFSUtils creating dirs under top level dir

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java?rev=1345343&r1=1345342&r2=1345343&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java Fri Jun  1 20:43:33 2012
@@ -216,14 +216,15 @@ public class TestFSUtils {
   
   @Test
   public void testDeleteAndExists() throws Exception {
-    Configuration conf = HBaseConfiguration.create();
+    HBaseTestingUtility htu = new HBaseTestingUtility();
+    Configuration conf = htu.getConfiguration();
     conf.setBoolean(HConstants.ENABLE_DATA_FILE_UMASK, true);
     FileSystem fs = FileSystem.get(conf);
     FsPermission perms = FSUtils.getFilePermissions(fs, conf, HConstants.DATA_FILE_UMASK_KEY);
     // then that the correct file is created
     String file = UUID.randomUUID().toString();
-    Path p = new Path("temptarget" + File.separator + file);
-    Path p1 = new Path("temppath" + File.separator + file);
+    Path p = new Path(htu.getDataTestDir(), "temptarget" + File.separator + file);
+    Path p1 = new Path(htu.getDataTestDir(), "temppath" + File.separator + file);
     try {
       FSDataOutputStream out = FSUtils.create(fs, p, perms);
       out.close();
@@ -247,4 +248,3 @@ public class TestFSUtils {
   public org.apache.hadoop.hbase.ResourceCheckerJUnitRule cu =
     new org.apache.hadoop.hbase.ResourceCheckerJUnitRule();
 }
-