Misc improvements for distributed tests#22687
Merged
vepadulano merged 8 commits intoJun 25, 2026
Merged
Conversation
The connection object (i.e. a Dask Client wrapping a LocalCluster) created for
running the distributed RDataFrame test suite is now better managed at the end
of the test run.
Sporadically, the following Python error was seen at the end of a perfectly fine
test suite run:
```
Traceback (most recent call last):
File "/usr/lib64/python3.14/logging/__init__.py", line 1154, in emit
stream.write(msg + self.terminator)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
ValueError: I/O operation on closed file.
```
The cause for the error may be due to the fact that pytest is shutting down the
Python process, thus also closing the streams, but some Dask workers may still
be trying to write logging outputs to them.
In general, closing a Client connection but not closing also the attached
cluster can lead to inconsistencies in the target application, as highlighted
e.g. by dask/distributed#1042.
Unfortunately, the interaction between Client, cluster and garbage collection
seems to be neither straightforward nor completely understood even by the Dask
community itself, see for example
https://dask.discourse.group/t/best-practice-for-shutting-down-a-cluster/.
And treat all warnings as errors
Moving to ROOT_ADD_PYUNITTEST simplifies how the suite of distributed tests is run, i.e. it simply runs it as `python test_all.py`. This shows the output from the pytest suite as if it were run manually, as desired, without interference from the roottest machinery around it introduced with the previous ROOTTEST_ADD_TEST.
4534119 to
dfc41da
Compare
Test Results 22 files 22 suites 2d 14h 52m 26s ⏱️ For more details on these failures, see this check. Results for commit dfc41da. ♻️ This comment has been updated with latest results. |
hageboeck
approved these changes
Jun 25, 2026
hageboeck
left a comment
Member
There was a problem hiding this comment.
Looks like useful cleanups to me. The nightlies will tell if this also affects the failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See each commit for details