hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1345343 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSUtils.java
Date Fri, 01 Jun 2012 20:43:34 GMT
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();
 }
-



Mime
View raw message