Skip to content

Commit

Permalink
FIX-#3818: Ignore files from /private/tmp/ray/ when detecting file le…
Browse files Browse the repository at this point in the history
…aks (#3826)

Signed-off-by: jeffreykennethli <jkli@ponder.io>
  • Loading branch information
jeffreykennethli authored Dec 13, 2021
1 parent 7e85c5d commit 0b7c642
Showing 1 changed file with 12 additions and 4 deletions.
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

0 comments on commit 0b7c642

Please sign in to comment.