HyukjinKwon commented on a change in pull request #25847: [SPARK-21045][PYTHON] 
Allow non-ascii string as an exception message in Python 2
URL: https://github.com/apache/spark/pull/25847#discussion_r326065008
 
 

 ##########
 File path: python/pyspark/tests/test_worker.py
 ##########
 @@ -150,6 +151,28 @@ def test_with_different_versions_of_python(self):
         finally:
             self.sc.pythonVer = version
 
+    def test_python_exception_non_hanging(self):
+        """
+        SPARK-21045: exceptions with no ascii encoding shall not hanging 
PySpark.
+        """
+        def f():
+            raise Exception("exception with δΈ­ and \xd6\xd0")
+
+        def run():
+            self.sc.parallelize([1]).map(lambda x: f()).count()
 
 Review comment:
   Let's just test directly without a thread. Actually indefinitely hanging is 
another issue that the exception thrown during exception handling is not dealt 
with.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to