Skip to content

Commit 7bd3a3f

Browse files
committed
race: create basetemp only once!
1 parent 2b4372b commit 7bd3a3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/xdist/workermanage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ def setup_nodes(
9393
self,
9494
putevent: Callable[[tuple[str, dict[str, Any]]], None],
9595
) -> list[WorkerController]:
96+
# create basetemp directory only once
97+
if hasattr(self.config, "_tmp_path_factory"):
98+
self.config._tmp_path_factory.getbasetemp()
99+
96100
self.config.hook.pytest_xdist_setupnodes(config=self.config, specs=self.specs)
97101
self.trace("setting up nodes")
98102
with ThreadPoolExecutor(max_workers=len(self.specs)) as executor:

0 commit comments

Comments
 (0)