HyukjinKwon commented on code in PR #36432:
URL: https://github.com/apache/spark/pull/36432#discussion_r863260273


##########
python/pyspark/tests/test_broadcast.py:
##########
@@ -99,6 +101,30 @@ def test_broadcast_value_against_gc(self):
         finally:
             b.destroy()
 
+    def test_broadcast_when_sc_none(self):
+        # SPARK-39029 : Test case to improve test coverage of broadcast.py
+        # It test the case when sc is none and Broadcast is called at executor

Review Comment:
   ```suggestion
           # It tests the case when SparkContext is none and Broadcast is 
called at executor
   ```



##########
python/pyspark/tests/test_broadcast.py:
##########
@@ -99,6 +101,30 @@ def test_broadcast_value_against_gc(self):
         finally:
             b.destroy()
 
+    def test_broadcast_when_sc_none(self):
+        # SPARK-39029 : Test case to improve test coverage of broadcast.py
+        # It test the case when sc is none and Broadcast is called at executor
+        conf = SparkConf()
+        conf.setMaster("local-cluster[2,1,1024]")
+        self.sc = SparkContext(conf=conf)
+        bs = self.sc.broadcast([10])
+        bs_sc_none = Broadcast(sc=None, path=bs._path)
+        self.assertEqual(bs_sc_none.value, [10])
+
+    def test_broadcast_for_error_condition(self):
+        # SPARK-39029: Test case to improve test coverage of broadcast.py
+        # It test the case when broadcast should raise error .

Review Comment:
   ```suggestion
           # It tests the case when broadcast should raise error .
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to