tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-393: Unit tests must use test-data directory. (hyunsik)
Date Sun, 08 Dec 2013 07:36:44 GMT
Updated Branches:
  refs/heads/master 7e47f6b01 -> 8ce2a9402


TAJO-393: Unit tests must use test-data directory. (hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/8ce2a940
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/8ce2a940
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/8ce2a940

Branch: refs/heads/master
Commit: 8ce2a940212ef069a443b767102500e5252b7566
Parents: 7e47f6b
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Sun Dec 8 16:36:27 2013 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Sun Dec 8 16:36:27 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                                     | 2 ++
 .../src/test/java/org/apache/tajo/BackendTestingUtil.java       | 3 ---
 .../src/test/java/org/apache/tajo/client/TestTajoClient.java    | 5 ++---
 3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/8ce2a940/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 41ae245..71ba16d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -109,6 +109,8 @@ Release 0.8.0 - unreleased
 
   BUG FIXES
 
+    TAJO-393: Unit tests must use test-data directory. (hyunsik)
+
     TAJO-388: limit clause does not work properly. (hyunsik)
 
     TAJO-389: The LazyTuple does not work when number format exception occurs 

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/8ce2a940/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/BackendTestingUtil.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/BackendTestingUtil.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/BackendTestingUtil.java
index 8f7189f..0064e41 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/BackendTestingUtil.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/BackendTestingUtil.java
@@ -21,8 +21,6 @@
  */
 package org.apache.tajo;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.tajo.catalog.CatalogUtil;
@@ -39,7 +37,6 @@ import java.io.IOException;
 public class BackendTestingUtil {
 	public final static Schema mockupSchema;
 	public final static TableMeta mockupMeta;
-  private static final Log LOG = LogFactory.getLog(BackendTestingUtil.class);
 
 	static {
     mockupSchema = new Schema();

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/8ce2a940/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestTajoClient.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestTajoClient.java
b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestTajoClient.java
index 9407912..8e257f2 100644
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestTajoClient.java
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestTajoClient.java
@@ -199,14 +199,13 @@ public class TestTajoClient {
 
   @Test
   public final void testDDLByExecuteQuery() throws IOException, ServiceException {
-    TajoConf conf = cluster.getConfiguration();
     final String tableName = "testDDLByExecuteQuery";
-    BackendTestingUtil.writeTmpTable(conf, CommonTestingUtil.getTestDir());
+    Path tablePath = writeTmpTable(tableName);
 
     assertFalse(client.existTable(tableName));
     String sql =
         "create external table " + tableName + " (deptname text, score int4) "
-            + "using csv location 'file:///tmp/" + tableName + "'";
+            + "using csv location '" + tablePath + "'";
     client.executeQueryAndGetResult(sql);
     assertTrue(client.existTable(tableName));
   }


Mime
View raw message