Skip to content

test: add Clear concurrency tests (Clear during Store, Clear during Range) #43

@millerjp

Description

@millerjp

Summary

TestClear covers Clear only single-threaded. A consumer calling Clear concurrently with Store/Load/Range (cache-flush-on-reload patterns) has no safety evidence.

Scope

Analogous to existing TestRangeDuringWrites / TestDeleteDuringRange:

  • TestClearDuringWrites — 16 goroutines storing while one goroutine periodically Clears; assert no panic, -race clean, goleak clean.
  • TestClearDuringRange — one ranger running while Clear fires; assert no panic, observed keys bounded, duplicate visits impossible.

Acceptance criteria

  1. Both tests stable over go test -race -count=10 ./....
  2. Coverage unchanged (100%).

Source: test-analyst agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Blocks releasetestingTests: unit, BDD, benchmarks, fuzz

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions