Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Aug 20, 2014
1 parent 32d216f commit 8074a80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@

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

import org.scalatest.BeforeAndAfterAll

import org.apache.spark.sql.hive.test.TestHive

/**
* A set of tests that validates support for Hive SerDe.
*/
class HiveSerDeSuite extends HiveComparisonTest {
class HiveSerDeSuite extends HiveComparisonTest with BeforeAndAfterAll {

override def beforeAll() = {
TestHive.cacheTables = false
}

createQueryTest(
"Read and write with LazySimpleSerDe (tab separated)",
"SELECT * from serdeins")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

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

import org.scalatest.BeforeAndAfter

import org.apache.spark.sql.hive.test.TestHive

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

override def beforeAll() = {
TestHive.cacheTables = false
}

// Column/partition pruning is not implemented for `InMemoryColumnarTableScan` yet, need to reset
// the environment to ensure all referenced tables in this suites are not cached in-memory.
// Refer to https://issues.apache.org/jira/browse/SPARK-2283 for details.
Expand Down

0 comments on commit 8074a80

Please sign in to comment.