Skip to content
Closed
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: 2 additions & 1 deletion python/pyspark/sql/connect/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from google.protobuf import text_format, any_pb2
from google.rpc import error_details_pb2

from pyspark.util import is_remote_only
from pyspark.accumulators import SpecialAccumulatorIds
from pyspark.loose_version import LooseVersion
from pyspark.version import __version__
Expand Down Expand Up @@ -291,7 +292,7 @@ class DefaultChannelBuilder(ChannelBuilder):

@staticmethod
def default_port() -> int:
if "SPARK_TESTING" in os.environ:
if "SPARK_TESTING" in os.environ and not is_remote_only():
from pyspark.sql.session import SparkSession as PySparkSession

# In the case when Spark Connect uses the local mode, it starts the regular Spark
Expand Down