Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 8f33ee8

Browse files
authored
Reduced shared parquet file contention in testing (#440)
* Hotfix for from_parquet contention * Fix typo
1 parent 40236a3 commit 8f33ee8

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed
3.76 KB
Binary file not shown.
29.2 KB
Binary file not shown.

tests/tape_tests/test_ensemble.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2054,11 +2054,24 @@ def my_mean(flux, time, dup_time, band):
20542054

20552055
@pytest.mark.parametrize("on", [None, ["ps1_objid", "filterName"], ["filterName", "ps1_objid"]])
20562056
@pytest.mark.parametrize("func_label", ["mean", "bounds"])
2057-
def test_batch_by_band(parquet_ensemble, func_label, on):
2057+
def test_batch_by_band(func_label, on):
20582058
"""
20592059
Test that ensemble.batch(by_band=True) works as intended.
20602060
"""
20612061

2062+
# TODO(wbeebe): This is a temporary workaround for https://github.com/lincc-frameworks/tape/issues/434 to avoid contention when reading data
2063+
# from the test files in parallel. This is the same as `parquet_ensemble` but uses copies of the parquet files referenced there.
2064+
parquet_ensemble = Ensemble(client=False)
2065+
parquet_ensemble.from_parquet(
2066+
"tests/tape_tests/data/source/test_source2.parquet",
2067+
"tests/tape_tests/data/object/test_object2.parquet",
2068+
id_col="ps1_objid",
2069+
time_col="midPointTai",
2070+
band_col="filterName",
2071+
flux_col="psFlux",
2072+
err_col="psFluxErr",
2073+
)
2074+
20622075
if func_label == "mean":
20632076

20642077
def my_mean(flux):

0 commit comments

Comments
 (0)