Skip to content

test_implied_dirs_performance is flaky #102209

Closed
jaraco/zipp
#94
@jaraco

Description

@jaraco

Reported in discord, since #102018, the timing check was added to test_implied_dirs_performance and this check is frequently failing (example):

ERROR: test_implied_dirs_performance (test.test_zipfile.test_path.TestPath.test_implied_dirs_performance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\contextlib.py", line 80, in inner
    with self._recreate_cm():
  File "D:\a\cpython\cpython\Lib\test\test_zipfile\_context.py", line 30, in __exit__
    raise DeadlineExceeded(duration, self.max_duration)
test.test_zipfile._context.DeadlineExceeded: (3.140999999999849, 3)

These failures aren't occurring on zipp, where the check has been running for years without fail.

Furthermore, the check is currently not capturing the failure case because the invocation fails to consume the generator:

zipfile.CompleteDirs._implied_dirs(data)

That indicates that the flaky failures are due to the construction of test data:

data = ['/'.join(string.ascii_lowercase + str(n)) for n in range(10000)]

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