8000 ci: Fix pyspark test suite by sentrivana · Pull Request #4382 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

ci: Fix pyspark test suite #4382

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

Merged
merged 19 commits into from
May 15, 2025
7 changes: 4 additions & 3 deletions tests/integrations/spark/test_spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)
from sentry_sdk.integrations.spark.spark_worker import SparkWorkerIntegration

from pyspark import SparkContext
from pyspark import SparkConf, SparkContext

from py4j.protocol import Py4JJavaError

Expand All @@ -25,12 +25,13 @@ def sentry_init_with_reset(sentry_init):
from sentry_sdk.integrations import _processed_integrations

yield lambda: sentry_init(integrations=[SparkIntegration()])
_processed_integrations.remove("spark")
_processed_integrations.discard("spark")


@pytest.fixture(scope="function")
def create_spark_context():
yield lambda: SparkContext(appName="Testing123")
conf = SparkConf().set("spark.driver.bindAddress", "127.0.0.1")
yield lambda: SparkContext(conf=conf, appName="Testing123")
SparkContext._active_spark_context.stop()


Expand Down
Loading
0