Skip to content

fix(tests): the second-signal test of devops ci test waits for an event, not a time window, so it passes under load #2069

Closed

Description

@dan-petty

Problem

tests/test_ci.py::test_a_second_signal_to_devops_ci_test_cannot_skip_the_sigkill[SIGINT] failed in a pre-commit run of the covering tests on 2026-10-24 (wait_until(watch.stopped) was False). The same test passed alone right after (3 passed). The host was under load: several gates and agents ran at the same time. The project allows no flaky tests.

Found while #2004 was committed.

Proposed fix

  • Find what the test waits for, and whether its window depends on the host's speed. tests/support/waits.py holds the shared wait helpers.
  • Make the test wait for an event that the code under test signals, not for a time window, as docs/TESTING.md requires.

Acceptance criteria

  • The test passes 50 times in a row with uv run devops ci test tests/test_ci.py -k second_signal --repeat 50 under a parallel load (for example, while another uv run devops ci test runs).

Activity

  1. added
    type/bug
    scope/ci
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Delivered by #2139 (merged 2026-10-24, fc12d05), which named this item with "also delivers #2069" and no closing keyword.

    The cause was in the product: asyncio.run's own SIGINT handler raised KeyboardInterrupt at a second Ctrl-C before the stop's try whose finally sends the SIGKILL. devops ci test now takes Ctrl-C itself through loop.add_signal_handler (SIGINT is in CONST_CI_RUN_STOP_SIGNAL_NAMES), and test_a_second_ctrl_c_just_after_the_stop_sends_its_sigint_cannot_skip_the_sigkill covers it. The signal tests passed 50 of 50 runs under CPU load (#2139).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope/citype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions