aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSteve Loughran <stevel@hortonworks.com>2015-07-15 12:15:35 -0700
committerReynold Xin <rxin@databricks.com>2015-07-15 12:15:35 -0700
commitec9b621647b893abae3afef219bceab382b99564 (patch)
tree1bdf441c73d1dba6c4f6ad5343783dfb830a7fe1 /sql
parent303c1201c468d360a5f600ce37b8bee75a77a0e6 (diff)
downloadspark-ec9b621647b893abae3afef219bceab382b99564.tar.gz
spark-ec9b621647b893abae3afef219bceab382b99564.tar.bz2
spark-ec9b621647b893abae3afef219bceab382b99564.zip
SPARK-9070 JavaDataFrameSuite teardown NPEs if setup failed
fix teardown to skip table delete if hive context is null Author: Steve Loughran <stevel@hortonworks.com> Closes #7425 from steveloughran/stevel/patches/SPARK-9070-JavaDataFrameSuite-NPE and squashes the following commits: 1982d38 [Steve Loughran] SPARK-9070 JavaDataFrameSuite teardown NPEs if setup failed
Diffstat (limited to 'sql')
-rw-r--r--sql/hive/src/test/java/test/org/apache/spark/sql/hive/JavaDataFrameSuite.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/hive/src/test/java/test/org/apache/spark/sql/hive/JavaDataFrameSuite.java b/sql/hive/src/test/java/test/org/apache/spark/sql/hive/JavaDataFrameSuite.java
index c4828c4717..741a3cd31c 100644
--- a/sql/hive/src/test/java/test/org/apache/spark/sql/hive/JavaDataFrameSuite.java
+++ b/sql/hive/src/test/java/test/org/apache/spark/sql/hive/JavaDataFrameSuite.java
@@ -61,7 +61,9 @@ public class JavaDataFrameSuite {
@After
public void tearDown() throws IOException {
// Clean up tables.
- hc.sql("DROP TABLE IF EXISTS window_table");
+ if (hc != null) {
+ hc.sql("DROP TABLE IF EXISTS window_table");
+ }
}
@Test