Skip to content

test_concurrent_lazy_import_reification is flaky #154561

Description

@StanFromIreland

Bug report

Bug description:

See for example, this run:


======================================================================
FAIL: test_concurrent_lazy_import_reification (test.test_lazy_import.ThreadSafetyTests.test_concurrent_lazy_import_reification)
Multiple threads racing to reify the same lazy import should succeed.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/Lib/test/test_lazy_import/__init__.py", line 1820, in test_concurrent_lazy_import_reification
    self.assertEqual(errors, [], f"Errors occurred: {errors}")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: [(9, AttributeError("module 'test.test_laz[39 chars]'"))] != []

First list contains 1 additional elements.
First extra element 0:
(9, AttributeError("module 'test.test_lazy_import.data' has no attribute 'basic2'"))

+ []
- [(9,
-   AttributeError("module 'test.test_lazy_import.data' has no attribute 'basic2'"))] : Errors occurred: [(9, AttributeError("module 'test.test_lazy_import.data' has no attribute 'basic2'"))]

----------------------------------------------------------------------
Ran 128 tests in 78.334s

FAILED (failures=1)
test test_lazy_import failed

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions