mirror of
https://github.com/wassname/ray.git
synced 2026-08-03 13:10:57 +08:00
Fix a few flaky tests (#9709)
Fix test_custom_resources, Remove test_pandas_parquet_serialization, Better error message for test_output.py, Potentially fix test_dynres::test_dynamic_res_creation_scheduler_consistency
This commit is contained in:
@@ -2,11 +2,9 @@
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import json
|
||||
import sys
|
||||
import socket
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
@@ -416,24 +414,6 @@ def test_ray_stack(ray_start_2_cpus):
|
||||
"'ray stack'")
|
||||
|
||||
|
||||
def test_pandas_parquet_serialization():
|
||||
# Only test this if pandas is installed
|
||||
pytest.importorskip("pandas")
|
||||
|
||||
import pandas as pd
|
||||
import pyarrow as pa
|
||||
import pyarrow.parquet as pq
|
||||
|
||||
tempdir = tempfile.mkdtemp()
|
||||
filename = os.path.join(tempdir, "parquet-test")
|
||||
pd.DataFrame({"col1": [0, 1], "col2": [0, 1]}).to_parquet(filename)
|
||||
with open(os.path.join(tempdir, "parquet-compression"), "wb") as f:
|
||||
table = pa.Table.from_arrays([pa.array([1, 2, 3])], ["hello"])
|
||||
pq.write_table(table, f, compression="lz4")
|
||||
# Clean up
|
||||
shutil.rmtree(tempdir)
|
||||
|
||||
|
||||
def test_socket_dir_not_existing(shutdown_only):
|
||||
if sys.platform != "win32":
|
||||
random_name = ray.ObjectRef.from_random().hex()
|
||||
|
||||
Reference in New Issue
Block a user