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-48088][PYTHON][CONNECT][TESTS] Prepare backward compatibility test 4.0 <> above #46358

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/pyspark/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,9 @@ def is_remote_only() -> bool:
"""
global _is_remote_only

if "SPARK_SKIP_CONNECT_COMPAT_TESTS" in os.environ:
return True

if _is_remote_only is not None:
return _is_remote_only
try:
Expand Down
18 changes: 11 additions & 7 deletions python/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ def get_valid_filename(s):

# Find out where the assembly jars are located.
# TODO: revisit for Scala 2.13
for scala in ["2.13"]:
build_dir = os.path.join(SPARK_HOME, "assembly", "target", "scala-" + scala)
if os.path.isdir(build_dir):
SPARK_DIST_CLASSPATH = os.path.join(build_dir, "jars", "*")
break
else:
raise RuntimeError("Cannot find assembly build directory, please build Spark first.")
SPARK_DIST_CLASSPATH = ""
if "SPARK_SKIP_CONNECT_COMPAT_TESTS" not in os.environ:
for scala in ["2.13"]:
build_dir = os.path.join(SPARK_HOME, "assembly", "target", "scala-" + scala)
if os.path.isdir(build_dir):
SPARK_DIST_CLASSPATH = os.path.join(build_dir, "jars", "*")
break
else:
raise RuntimeError("Cannot find assembly build directory, please build Spark first.")


def run_individual_python_test(target_dir, test_name, pyspark_python, keep_test_output):
Expand Down Expand Up @@ -100,6 +102,8 @@ def run_individual_python_test(target_dir, test_name, pyspark_python, keep_test_

if "SPARK_CONNECT_TESTING_REMOTE" in os.environ:
env.update({"SPARK_CONNECT_TESTING_REMOTE": os.environ["SPARK_CONNECT_TESTING_REMOTE"]})
if "SPARK_SKIP_CONNECT_COMPAT_TESTS" in os.environ:
env.update({"SPARK_SKIP_JVM_REQUIRED_TESTS": os.environ["SPARK_SKIP_CONNECT_COMPAT_TESTS"]})

# Create a unique temp directory under 'target/' for each run. The TMPDIR variable is
# recognized by the tempfile module to override the default system temp directory.
Expand Down