Files
zhenshan.caoandClaude Opus 5.5 228dc7800c test: give each RemoteBulkWriter a private local_path (#54272)
## Problem

Without `local_path`, `RemoteBulkWriter` stages files under
`<dirname(sys.argv[0])>/bulk_writer`, so every pytest-xdist worker
shares one parent directory. pymilvus creates that parent and the
per-writer uuid subdirectory in two separate `mkdir` calls, and
`__exit__` removes the parent when it looks empty. When one worker exits
between another worker's two `mkdir` calls, the second `mkdir` fails
with `FileNotFoundError`.

Observed as `test_import_without_embedding[False-numpy]` failing under
`-n 32`.

## Fix

Pass `local_path=tempfile.mkdtemp(prefix="bulk_writer_")` at every
`RemoteBulkWriter` call site in `tests/python_client` so no two writers
share a parent directory. pymilvus still removes the empty directory on
exit, so nothing is left behind.

Test-only change; no product code touched.

## Verification

Ran the full PR-tier e2e (`ci_e2e_4am.sh`, L0+L1, `-n 32`) on a
standalone built from this branch: 9113 passed / 428 skipped, including
all 6 `test_import_without_embedding` parametrizations and all
bulk_insert / data_integrity cases. The only failures were 7
`test_milvus_client_pyudf` cases caused by the PyUDF runtime module not
being installed on the test host, unrelated to this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:33:51 +08:00
..