Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-47623][PYTHON][CONNECT][TESTS] Use QuietTest in parity tests #45747

Closed
wants to merge 1 commit into from

Conversation

zhengruifeng
Copy link
Contributor

@zhengruifeng zhengruifeng commented Mar 28, 2024

What changes were proposed in this pull request?

1, add def quiet in both ReusedPySparkTestCase and ReusedConnectTestCase;
2, replace existing QuietTest(self.sc) with self.quiet();
3, remove unnecessary overridden parity tests;

Why are the changes needed?

there are a lot of tests not enabled in parity test due to the usage of sc in with QuietTest(self.sc), some of them were break into def check_ and call the check_ functions in the parity tests;
However, there are still such tests not enabled.

This PR aims to enable QuietTest within parity tests and make it easier to enable the remaining tests (def check_ no longer needed).

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

init
@@ -184,6 +184,7 @@ def setUpClass(cls):
.remote(cls.master())
.getOrCreate()
)
cls._legacy_sc = PySparkSession._instantiatedSession._sc
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refer to test_connect_basic

cls.connect = cls.spark # Switch Spark Connect session and regular PySpark session.
cls.spark = PySparkSession._instantiatedSession
assert cls.spark is not None

@HyukjinKwon
Copy link
Member

Merged to master.

@zhengruifeng zhengruifeng deleted the py_test_sc branch March 28, 2024 23:59
sweisdb pushed a commit to sweisdb/spark that referenced this pull request Apr 1, 2024
### What changes were proposed in this pull request?
1, add `def quiet` in both `ReusedPySparkTestCase` and `ReusedConnectTestCase`;
2, replace existing `QuietTest(self.sc)` with `self.quiet()`;
3, remove unnecessary overridden parity tests;

### Why are the changes needed?
there are a lot of tests not enabled in parity test due to the usage of `sc` in `with QuietTest(self.sc)`, some of them were break into `def check_` and call the `check_` functions in the parity tests;
However, there are still such tests not enabled.

This PR aims to enable `QuietTest` within parity tests and make it easier to enable the remaining tests (`def check_` no longer needed).

### 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 apache#45747 from zhengruifeng/py_test_sc.

Authored-by: Ruifeng Zheng <ruifengz@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants