Skip to content

There should be a test-only blocking mode #162

@nes1983

Description

@nes1983

The readme file shows that in order to test ristretto, one must use time.Sleep. As far as I understand, that isn't good software engineering practice. In fact, it's conceptually inherently a race condition. I understand it isn't the kind of race condition that can yield memory corruption. But still -- any test that relies on test.Sleep can fail if it misjudges how long an operation can take.

I'd like to propose a test-only mode that makes the Set operation blocking, until the write has completed. With it, one can write more predictable, simpler unit test.

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