Repository: tajo Updated Branches: refs/heads/branch-0.8.0 ca22fe457 -> b97faf5b3
TAJO-707: Jenkins build failure in TestNetTypes. (jihoon) Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/b97faf5b Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/b97faf5b Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/b97faf5b Branch: refs/heads/branch-0.8.0 Commit: b97faf5b385a84ed1e72a98919c9292921f4de4b Parents: ca22fe4 Author: Jihoon Son <[email protected]> Authored: Tue Mar 25 22:07:05 2014 +0900 Committer: Jihoon Son <[email protected]> Committed: Tue Mar 25 22:07:05 2014 +0900 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../java/org/apache/tajo/QueryTestCaseBase.java | 4 +-- .../apache/tajo/engine/query/TestNetTypes.java | 27 +++++++++++++++----- .../resources/dataset/TestNetTypes/table1.tbl | 5 ---- .../dataset/TestNetTypes/table1/table1.tbl | 5 ++++ .../resources/dataset/TestNetTypes/table2.tbl | 4 --- .../dataset/TestNetTypes/table2/table2.tbl | 4 +++ .../queries/TestNetTypes/drop_table1_ddl.sql | 1 + .../queries/TestNetTypes/drop_table2_ddl.sql | 1 + 9 files changed, 35 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a7a8d1f..ea49240 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -283,6 +283,8 @@ Release 0.8.0 - unreleased BUG FIXES + TAJO-707: Jenkins build failure in TestNetTypes. (jihoon) + TAJO-693: StatusUpdateTransition in QueryUnitAttempt handles TA_UPDATE incorrectly. (hyunsik) http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java index e8c70ac..65a0d47 100644 --- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java +++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java @@ -168,14 +168,14 @@ public class QueryTestCaseBase { @AfterClass public static void tearDownClass() throws ServiceException { for (String tableName : createdTableGlobalSet) { - client.updateQuery("DROP TABLE IF EXISTS " +tableName + " PURGE"); + client.updateQuery("DROP TABLE IF EXISTS " +tableName); } createdTableGlobalSet.clear(); // if the current database is "default", shouldn't drop it. if (!currentDatabase.equals(TajoConstants.DEFAULT_DATABASE_NAME)) { for (String tableName : catalog.getAllTableNames(currentDatabase)) { - client.updateQuery("DROP TABLE IF EXISTS " + tableName + " PURGE"); + client.updateQuery("DROP TABLE IF EXISTS " + tableName); } client.selectDatabase(TajoConstants.DEFAULT_DATABASE_NAME); http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestNetTypes.java ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestNetTypes.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestNetTypes.java index bba47cc..e65eb61 100644 --- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestNetTypes.java +++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestNetTypes.java @@ -19,56 +19,69 @@ package org.apache.tajo.engine.query; import org.apache.tajo.QueryTestCaseBase; -import org.junit.Before; import org.junit.Test; import java.sql.ResultSet; public class TestNetTypes extends QueryTestCaseBase { - @Before - public final void setup() throws Exception { - executeDDL("table1_ddl.sql", "table1.tbl"); - executeDDL("table2_ddl.sql", "table2.tbl"); - } - @Test public final void testSelect() throws Exception { + executeDDL("table1_ddl.sql", "table1"); + executeDDL("table2_ddl.sql", "table2"); // select name, addr from table1; ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); + executeDDL("drop_table1_ddl.sql", "table1"); + executeDDL("drop_table2_ddl.sql", "table2"); } @Test public final void testGroupby() throws Exception { + executeDDL("table1_ddl.sql", "table1"); + executeDDL("table2_ddl.sql", "table2"); // select name, addr, count(1) from table1 group by name, addr; ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); + executeDDL("drop_table1_ddl.sql", "table1"); + executeDDL("drop_table2_ddl.sql", "table2"); } @Test public final void testGroupby2() throws Exception { + executeDDL("table1_ddl.sql", "table1"); + executeDDL("table2_ddl.sql", "table2"); // select addr, count(*) from table1 group by addr; ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); + executeDDL("drop_table1_ddl.sql", "table1"); + executeDDL("drop_table2_ddl.sql", "table2"); } @Test public final void testSort() throws Exception { + executeDDL("table1_ddl.sql", "table1"); + executeDDL("table2_ddl.sql", "table2"); // select * from table1 order by addr; ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); + executeDDL("drop_table1_ddl.sql", "table1"); + executeDDL("drop_table2_ddl.sql", "table2"); } @Test public final void testJoin() throws Exception { + executeDDL("table1_ddl.sql", "table1"); + executeDDL("table2_ddl.sql", "table2"); // select * from table1 as t1, table2 as t2 where t1.addr = t2.addr; ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); + executeDDL("drop_table1_ddl.sql", "table1"); + executeDDL("drop_table2_ddl.sql", "table2"); } } http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1.tbl ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1.tbl b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1.tbl deleted file mode 100644 index 63db89d..0000000 --- a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1.tbl +++ /dev/null @@ -1,5 +0,0 @@ -1|ooo|1.1|a|127.0.0.1 -2|ppp|2.3|b|127.0.1.1 -3|qqq|3.4|c|127.0.0.8 -4|rrr|4.5|d|127.0.0.1 -5|xxx|5.6|e|127.0.1.1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1/table1.tbl ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1/table1.tbl b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1/table1.tbl new file mode 100644 index 0000000..63db89d --- /dev/null +++ b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table1/table1.tbl @@ -0,0 +1,5 @@ +1|ooo|1.1|a|127.0.0.1 +2|ppp|2.3|b|127.0.1.1 +3|qqq|3.4|c|127.0.0.8 +4|rrr|4.5|d|127.0.0.1 +5|xxx|5.6|e|127.0.1.1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2.tbl ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2.tbl b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2.tbl deleted file mode 100644 index f33b22c..0000000 --- a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2.tbl +++ /dev/null @@ -1,4 +0,0 @@ -1|NULL|NULL|a|127.0.0.8 -2|NULL|NULL|b|127.0.0.8 -NULL|NULL|10.0|c|NULL -NULL|NULL|20.0|d|127.0.0.1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2/table2.tbl ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2/table2.tbl b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2/table2.tbl new file mode 100644 index 0000000..f33b22c --- /dev/null +++ b/tajo-core/tajo-core-backend/src/test/resources/dataset/TestNetTypes/table2/table2.tbl @@ -0,0 +1,4 @@ +1|NULL|NULL|a|127.0.0.8 +2|NULL|NULL|b|127.0.0.8 +NULL|NULL|10.0|c|NULL +NULL|NULL|20.0|d|127.0.0.1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table1_ddl.sql ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table1_ddl.sql b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table1_ddl.sql new file mode 100644 index 0000000..2062939 --- /dev/null +++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table1_ddl.sql @@ -0,0 +1 @@ +DROP TABLE table1; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/b97faf5b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table2_ddl.sql ---------------------------------------------------------------------- diff --git a/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table2_ddl.sql b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table2_ddl.sql new file mode 100644 index 0000000..2918a01 --- /dev/null +++ b/tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/drop_table2_ddl.sql @@ -0,0 +1 @@ +DROP TABLE table2; \ No newline at end of file
