diff --git ql/src/test/org/apache/hadoop/hive/ql/parse/TestColumnAccess.java ql/src/test/org/apache/hadoop/hive/ql/parse/TestColumnAccess.java index edcc313..5d22e27 100644 --- ql/src/test/org/apache/hadoop/hive/ql/parse/TestColumnAccess.java +++ ql/src/test/org/apache/hadoop/hive/ql/parse/TestColumnAccess.java @@ -31,6 +31,7 @@ import org.apache.hadoop.hive.ql.QueryPlan; import org.apache.hadoop.hive.ql.hooks.ReadEntity; import org.apache.hadoop.hive.ql.session.SessionState; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -47,6 +48,14 @@ public static void Setup() throws CommandNeedRetryException { Assert.assertEquals("Checking command success", 0, ret); } + @AfterClass + public static void Teardown() throws Exception { + Driver driver = createDriver(); + driver.run("drop table t1"); + driver.run("drop table t2"); + driver.run("drop view v1"); + } + @Test public void testQueryTable1() throws ParseException { String query = "select * from t1"; diff --git ql/src/test/org/apache/hadoop/hive/ql/plan/TestReadEntityDirect.java ql/src/test/org/apache/hadoop/hive/ql/plan/TestReadEntityDirect.java index 2d27cec..6615a45 100644 --- ql/src/test/org/apache/hadoop/hive/ql/plan/TestReadEntityDirect.java +++ ql/src/test/org/apache/hadoop/hive/ql/plan/TestReadEntityDirect.java @@ -38,6 +38,7 @@ import org.apache.hadoop.hive.ql.session.SessionState; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.AfterClass; import org.junit.Test; /** @@ -56,6 +57,13 @@ public static void onetimeSetup() throws CommandNeedRetryException { assertEquals("Checking command success", 0, ret); } + @AfterClass + public static void onetimeTeardown() throws Exception { + Driver driver = createDriver(); + driver.run("drop table t1"); + driver.run("drop view v1"); + } + @Before public void setup() { CheckInputReadEntityDirect.readEntities = null;