Skip to content

Coverage of MemcachePool.acquire() reconnect failure is flaky #527

Done

Description

@RayBB

pool.py lines 74–76 (putting the slot back when opening a replacement connection fails) have no test that targets them. They're only covered when a timeout in test_acquire_task_cancellation happens to land during a reconnect, so Codecov reports them covered on some runs and missed on others, even on master:

This shows up as "lost coverage" on unrelated PRs (e.g. #525).

A test that puts a broken connection in the pool and makes _create_new_conn() raise would cover it on every run and check that the pool keeps its slot. I can open a PR.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions