Skip to content

Replace sleep in tests with Promises #1389

@svroonland

Description

@svroonland

There's a number of zio-kafka tests that are doing sleeps to wait for some condition to occur, which have a high risk of being flaky.

A better solution is to use a Promise to signal that some condition has occurred and await it somewhere else. Examples in the can stop one stream while keeping another one running test in ConsumerSpec

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions