Skip to content

Commit 8074a80

Browse files
committed
fix tests
1 parent 32d216f commit 8074a80

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveSerDeSuite.scala

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@
1717

1818
package org.apache.spark.sql.hive.execution
1919

20+
import org.scalatest.BeforeAndAfterAll
21+
22+
import org.apache.spark.sql.hive.test.TestHive
23+
2024
/**
2125
* A set of tests that validates support for Hive SerDe.
2226
*/
23-
class HiveSerDeSuite extends HiveComparisonTest {
27+
class HiveSerDeSuite extends HiveComparisonTest with BeforeAndAfterAll {
28+
29+
override def beforeAll() = {
30+
TestHive.cacheTables = false
31+
}
32+
2433
createQueryTest(
2534
"Read and write with LazySimpleSerDe (tab separated)",
2635
"SELECT * from serdeins")

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruningSuite.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.spark.sql.hive.execution
1919

20+
import org.scalatest.BeforeAndAfter
21+
2022
import org.apache.spark.sql.hive.test.TestHive
2123

2224
/* Implicit conversions */
@@ -25,10 +27,14 @@ import scala.collection.JavaConversions._
2527
/**
2628
* A set of test cases that validate partition and column pruning.
2729
*/
28-
class PruningSuite extends HiveComparisonTest {
30+
class PruningSuite extends HiveComparisonTest with BeforeAndAfter {
2931
// MINOR HACK: You must run a query before calling reset the first time.
3032
TestHive.sql("SHOW TABLES")
3133

34+
override def beforeAll() = {
35+
TestHive.cacheTables = false
36+
}
37+
3238
// Column/partition pruning is not implemented for `InMemoryColumnarTableScan` yet, need to reset
3339
// the environment to ensure all referenced tables in this suites are not cached in-memory.
3440
// Refer to https://issues.apache.org/jira/browse/SPARK-2283 for details.

0 commit comments

Comments
 (0)