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:
Robert Nishihara
2020-07-25 17:11:38 -07:00
committed by GitHub
parent 54a0d8b69e
commit a8efb214de
4 changed files with 10 additions and 33 deletions
-20
View File
@@ -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()