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-#3818: Ignore files from /private/tmp/ray/ when detecting file leaks #3826

Merged
Merged
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
16 changes: 12 additions & 4 deletions modin/pandas/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.

import re
import pytest
import numpy as np
import math
Expand Down Expand Up @@ -1101,10 +1102,17 @@ def check(*a, **kw):
try:
fstart.remove(item)
except ValueError:
# ignore files in /proc/, as they have nothing to do with
# modin reading any data (and this is what we care about)
if not item[0].startswith("/proc/"):
leaks.append(item)
# Ignore files in /proc/, as they have nothing to do with
# modin reading any data (and this is what we care about).
if item[0].startswith("/proc/"):
continue
# Ignore files in /tmp/ray/session_*/logs (ray session logs)
# because Ray intends to keep these logs open even after
# work has been done.
if re.search(r"/tmp/ray/session_.*/logs", item[0]):
continue
leaks.append(item)

assert (
not leaks
), f"Unexpected open handles left for: {', '.join(item[0] for item in leaks)}"
Expand Down