Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address comments
  • Loading branch information
HyukjinKwon committed Dec 1, 2017
commit 0c7e5378a491f01b14df23fe56ae50a0f52971ee
6 changes: 6 additions & 0 deletions python/pyspark/ml/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,7 @@ class ImageReaderTest2(PySparkTestCase):
@classmethod
def setUpClass(cls):
PySparkTestCase.setUpClass()
# Note that here we enable Hive's support.
try:
cls.sc._jvm.org.apache.hadoop.hive.conf.HiveConf()
except py4j.protocol.Py4JError:
Expand All @@ -1852,6 +1853,11 @@ def setUpClass(cls):
raise unittest.SkipTest("Hive is not available")
cls.spark = HiveContext._createForTesting(cls.sc)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add classmethod tearDownClass to stop the cls.spark? I didn't see HiveContextSQLTests closes it anyway, maybe we can fix it too.

Copy link
Member Author

@HyukjinKwon HyukjinKwon Dec 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that should be safer but let me fix it this one here only for now. Let's fix that up too when we touch some codes around there.

@classmethod
def tearDownClass(cls):
PySparkTestCase.tearDownClass()
cls.spark.sparkSession.stop()

def test_read_images_multiple_times(self):
# This test case is to check if `ImageSchema.readImages` tries to
# initiate Hive client multiple times. See SPARK-22651.
Expand Down