grundprinzip commented on code in PR #39695: URL: https://github.com/apache/spark/pull/39695#discussion_r1083642374
########## python/pyspark/sql/tests/connect/test_connect_basic.py: ########## @@ -2591,6 +2591,73 @@ def test_unsupported_io_functions(self): getattr(df.write, f)() +@unittest.skipIf(not should_test_connect, connect_requirement_message) +class ClientTests(unittest.TestCase): + def test_retry_error_handling(self): + # Helper class for wrapping the test. + class TestError(grpc.RpcError, Exception): + def __init__(self, code: grpc.StatusCode): + self._code = code + + def code(self): + return self._code + + def stub(retries, w, code): + w["counter"] += 1 + if w["counter"] < retries: + raise TestError(code) + + from pyspark.sql.connect.client import Retrying Review Comment: Done -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org