From 8c27de68756d4b0e5940211340a0b323d808aead Mon Sep 17 00:00:00 2001 From: Ruifeng Zheng Date: Fri, 1 Sep 2023 10:01:36 -0700 Subject: [PATCH] [SPARK-44750][PYTHON][CONNECT][TESTS][FOLLOW-UP] Avoid creating session twice in `SparkConnectSessionWithOptionsTest` ### What changes were proposed in this pull request? Avoid creating session twice in `SparkConnectSessionWithOptionsTest` ### Why are the changes needed? the session created in `ReusedConnectTestCase#setUpClass` is not used, so no need to inherit ### Does this PR introduce _any_ user-facing change? no, test-only ### How was this patch tested? ci ### Was this patch authored or co-authored using generative AI tooling? no Closes #42747 from zhengruifeng/minor_test_ut. Authored-by: Ruifeng Zheng Signed-off-by: Dongjoon Hyun --- python/pyspark/sql/tests/connect/test_connect_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/sql/tests/connect/test_connect_basic.py b/python/pyspark/sql/tests/connect/test_connect_basic.py index 65560725b46a5..2b97957061898 100644 --- a/python/pyspark/sql/tests/connect/test_connect_basic.py +++ b/python/pyspark/sql/tests/connect/test_connect_basic.py @@ -3345,7 +3345,7 @@ def test_can_create_multiple_sessions_to_different_remotes(self): self.assertIn("Create a new SparkSession is only supported with SparkConnect.", str(e)) -class SparkConnectSessionWithOptionsTest(ReusedConnectTestCase): +class SparkConnectSessionWithOptionsTest(unittest.TestCase): def setUp(self) -> None: self.spark = ( PySparkSession.builder.config("string", "foo")