diff options
author | Steve Loughran <stevel@hortonworks.com> | 2015-07-15 12:15:35 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-15 12:15:35 -0700 |
commit | ec9b621647b893abae3afef219bceab382b99564 (patch) | |
tree | 1bdf441c73d1dba6c4f6ad5343783dfb830a7fe1 /sql | |
parent | 303c1201c468d360a5f600ce37b8bee75a77a0e6 (diff) | |
download | spark-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.java | 4 |
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 |