hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1542287 - in /hive/trunk/hcatalog/core/src/test/java/org/apache: hcatalog/cli/TestUseDatabase.java hive/hcatalog/cli/TestUseDatabase.java
Date Fri, 15 Nov 2013 15:15:43 GMT
Author: hashutosh
Date: Fri Nov 15 15:15:43 2013
New Revision: 1542287

URL: http://svn.apache.org/r1542287
Log:
HIVE-5791 : TestUseDatabase in hcategory failed to pass when illegal filename in /tmp (Jin
Jie via Ashutosh Chauhan)

Modified:
    hive/trunk/hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java
    hive/trunk/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java

Modified: hive/trunk/hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java?rev=1542287&r1=1542286&r2=1542287&view=diff
==============================================================================
--- hive/trunk/hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java (original)
+++ hive/trunk/hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java Fri
Nov 15 15:15:43 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.hcatalog.cli;
 
+import java.io.File;
 import java.io.IOException;
 
 import junit.framework.TestCase;
@@ -63,7 +64,10 @@ public class TestUseDatabase extends Tes
 
     CommandProcessorResponse response;
 
-    response = hcatDriver.run("alter table " + tblName + " add partition (b='2') location
'/tmp'");
+    String tmpDir = System.getProperty("test.tmp.dir");
+    File dir = new File(tmpDir + "/hive-junit-" + System.nanoTime());
+    dir.mkdir();
+    response = hcatDriver.run("alter table " + tblName + " add partition (b='2') location
'" + dir.getAbsolutePath() + "'");
     assertEquals(0, response.getResponseCode());
     assertNull(response.getErrorMessage());
 

Modified: hive/trunk/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java?rev=1542287&r1=1542286&r2=1542287&view=diff
==============================================================================
--- hive/trunk/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java
(original)
+++ hive/trunk/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java
Fri Nov 15 15:15:43 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.hive.hcatalog.cli;
 
+import java.io.File;
 import java.io.IOException;
 
 import junit.framework.TestCase;
@@ -61,7 +62,9 @@ public class TestUseDatabase extends Tes
 
     CommandProcessorResponse response;
 
-    response = hcatDriver.run("alter table " + tblName + " add partition (b='2') location
'/tmp'");
+    String tmpDir = System.getProperty("test.tmp.dir");
+    File dir = new File(tmpDir + "/hive-junit-" + System.nanoTime());
+    response = hcatDriver.run("alter table " + tblName + " add partition (b='2') location
'" + dir.getAbsolutePath() + "'");
     assertEquals(0, response.getResponseCode());
     assertNull(response.getErrorMessage());
 



Mime
View raw message