DUNE-DAQ / DUNE-DAQ/drunc

[Bug]: Unit tests in drunc not cleaning up properly

Open
#643 1 comment 0 reactions 1 assignee View on GitHub

@miruuna is already working on this.

Since Aug 20, 2026.

bug Testing
Dominant language
Python
Stars
3
Forks
5
Avg merge
2d 11h
Merged PRs (30d)
10

Description

Description

On the latest version of develop (c65c705aa07263ea365d1ad2984d3edb6d0af819) on a recent nightly (NFD_DEV_251024_A9, and I suspect later as well), running pytest shows that some proecsses don't have a good cleanup process.

Example 1.
src/drunc/tests/session_manager/test_session_manager_endpoints.py ...                                                                                                     [ 79%]
src/drunc/tests/session_manager/test_session_manager_serialisation.py .........                                                                                           [ 85%]
src/drunc/tests/session_manager/test_session_manager_servicer.py ......                                                                                                   [ 90%]
src/drunc/tests/utils/test_utils.py .............x                                                                                                                        [100%]Failed to kill process 1701979: (pid=1701979, name='drunc-controlle')
Failed to kill process 1702026: (pid=1702026, name='drunc-controlle')
Failed to kill process 1702342: (pid=1702342, name='drunc-controlle')
Failed to kill process 1702518: (pid=1702518, name='drunc-controlle')
Failed to kill process 1702525: (pid=1702525, name='drunc-controlle')
Failed to kill process 1702694: (pid=1702694, name='drunc-controlle')
Failed to kill process 1702695: (pid=1702695, name='drunc-controlle')
Failed to kill process 1702727: (pid=1702727, name='drunc-controlle')
Failed to kill process 1702921: (pid=1702921, name='drunc-controlle')
Failed to kill process 1703104: (pid=1703104, name='drunc-controlle')
Failed to kill process 1703105: (pid=1703105, name='drunc-controlle')
Failed to kill process 1703383: (pid=1703383, name='drunc-controlle')
Failed to kill process 1703384: (pid=1703384, name='drunc-controlle')
Example 2
(dbt) [pplesnia@np04-srv-019 drunc]$ pytest
============================================================================ test session starts ============================================================================
platform linux -- Python 3.10.10, pytest-8.3.3, pluggy-1.5.0
rootdir: /nfs/home/pplesnia/nightlyDev/251030/sourcecode/drunc
configfile: pyproject.toml
plugins: anyio-4.6.2.post1, integrationtest-3.5.0
collected 141 items                                                                                                                                                         

src/drunc/tests/controller/test_controller.py ..                                                                                                                      [  1%]
src/drunc/tests/controller/test_controller_driver.py ..                                                                                                               [  2%]
src/drunc/tests/controller/test_utils.py .                                                                                                                            [  3%]
src/drunc/tests/fsm/actions/test_utils.py ..                                                                                                                          [  4%]
src/drunc/tests/issues/test_issue309.py .                                                                                                                             [  5%]
src/drunc/tests/issues/test_issue363.py .                                                                                                                             [  6%]
src/drunc/tests/process_manager/interface/test_commands.py ........................                                                                                   [ 23%]
src/drunc/tests/process_manager/test_grpc_fields.py ................                                                                                                  [ 34%]
src/drunc/tests/process_manager/test_oks_parser.py .                                                                                                                  [ 35%]
src/drunc/tests/process_manager/test_process_manager_driver.py .....................................                                                                  [ 61%]
src/drunc/tests/process_manager/test_process_manager_endpoints.py ......                                                                                              [ 65%]
src/drunc/tests/process_manager/test_process_manager_serialisation.py ..........                                                                                      [ 73%]
src/drunc/tests/session_manager/test_session_manager_driver.py ......                                                                                                 [ 77%]
src/drunc/tests/session_manager/test_session_manager_endpoints.py ...                                                                                                 [ 79%]
src/drunc/tests/session_manager/test_session_manager_serialisation.py .........                                                                                       [ 85%]
src/drunc/tests/session_manager/test_session_manager_servicer.py ......                                                                                               [ 90%]
src/drunc/tests/utils/test_utils.py .............x                                                                                                                    [100%]Failed to kill process 1739326: (pid=1739326, name='ssh')
Failed to kill process 1739331: (pid=1739331, name='ssh')
Failed to kill process 1739351: (pid=1739351, name='ssh')
Failed to kill process 1739361: (pid=1739361, name='ssh')


====================================================================== 140 passed, 1 xfailed in 12.77s ======================================================================
(dbt) [pplesnia@np04-srv-019 drunc]$ 

Better cleanup procedures for the tests should be defined to prevent this

Steps to reproduce
  1. Setup nightly as usual with drunc
  2. run pytest
Version and environment

At least NFD_DEV_251024_A9, and 251030

Impact

Small/Isolated

Anything else?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.