Skip to content

test_logging: test_udp_reconnection() fails randomly #107237

Closed
@vstinner

Description

@vstinner

Example on Linux:

$ ./python -m test test_logging -m test_udp_reconnection -F -j100 -v
== CPython 3.13.0a0 (heads/remove_structmember:438462a3a0, Jul 25 2023, 14:21:21) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)]
== Linux-6.3.12-200.fc38.x86_64-x86_64-with-glibc2.37 little-endian
== Python build: debug
== cwd: /home/vstinner/python/main/build/test_python_694431æ
== CPU count: 12
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 4.60 Run tests in parallel using 100 child processes
(...)
0:00:10 load avg: 20.39 [ 18] test_logging passed
test_udp_reconnection (test.test_logging.IPv6SysLogHandlerTest.test_udp_reconnection) ... ok
test_udp_reconnection (test.test_logging.SysLogHandlerTest.test_udp_reconnection) ... ok
test_udp_reconnection (test.test_logging.UnixSysLogHandlerTest.test_udp_reconnection) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.305s

OK
0:00:10 load avg: 20.39 [ 19/1] test_logging failed (1 failure)
test_udp_reconnection (test.test_logging.IPv6SysLogHandlerTest.test_udp_reconnection) ... FAIL
test_udp_reconnection (test.test_logging.SysLogHandlerTest.test_udp_reconnection) ... ok
test_udp_reconnection (test.test_logging.UnixSysLogHandlerTest.test_udp_reconnection) ... ok

======================================================================
FAIL: test_udp_reconnection (test.test_logging.IPv6SysLogHandlerTest.test_udp_reconnection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_logging.py", line 2101, in test_udp_reconnection
    self.assertEqual(self.log_output, b'<11>sp\xc3\xa4m\x00')
AssertionError: b'' != b'<11>sp\xc3\xa4m\x00'
(...)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions