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

[FIX] connect, addr already in use #3343

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
7 changes: 7 additions & 0 deletions tests/connect/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import time

import pytest
from pyspark.sql import SparkSession

Expand Down Expand Up @@ -27,3 +29,8 @@ def spark_session():
# Cleanup
server.shutdown()
session.stop()

# Add cooldown period to allow socket to be fully released
# This prevents "Address already in use" errors when quickly restarting tests
# as the OS needs a moment to cleanup the TCP connection
time.sleep(2)