Skip to content

GitHub Actions: test_logging CI fails randomly #151463

@ByteFlowing1337

Description

@ByteFlowing1337

Bug report

Bug description:

test_logging CI randomly fails with a test_rollover_at_midnight AssertionError.

I can reproduce the failure locally on Windows—and less frequently on WSL2 Ubuntu 22.04—using:
./python -m test test_logging -m "test_rollover_at_weekday" -F

The output:

test test_logging failed -- Traceback (most recent call last):
  File "C:\coding\cpython\Lib\test\test_logging.py", line 6750, in test_rollover_at_weekday
    self.test_rollover_at_midnight(weekly=True)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "C:\coding\cpython\Lib\test\test_logging.py", line 6744, in test_rollover_at_midnight
    self.assertIn(f'testing2 {i}', line)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'testing2 0' not found in '2026-06-14 13:45:50,101 testing1 0\n'

See https://github.com/python/cpython/actions/runs/27469272829/job/81197168217 and https://github.com/python/cpython/actions/runs/27463542896/job/81181712774

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux, Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions