LuciferYang commented on code in PR #56652:
URL: https://github.com/apache/spark/pull/56652#discussion_r3452664965


##########
python/pyspark/pipelines/tests/test_add_pipeline_analysis_context.py:
##########
@@ -89,6 +90,25 @@ def test_nested_add_pipeline_analysis_context(self):
         thread_local_extensions_after_2 = 
self.spark.client.thread_local.user_context_extensions
         self.assertEqual(len(thread_local_extensions_after_2), 0)
 
+    def test_setup_failure_does_not_mask_original_error(self):

Review Comment:
   Good call. Extended the test to exercise each setup step that can fail 
before the extension is registered - context construction, `Pack`, and 
registration - since each must leave `extension_id` as `None` so cleanup is 
skipped and the original error propagates. I left out a literal `import 
pyspark.sql.connect.proto` failure: the module is always importable under 
`should_test_connect`, and faking it would only exercise Python's import 
machinery, not the guard.



-- 
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