You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
This change improves the reliability of tests in
`ConsumerSpec.scala` by replacing the use of `ZIO.sleep` with
synchronization primitives such as `Promise` and `Ref`. The previous
implementation relied on arbitrary sleep durations to wait for certain
conditions, which could lead to non-deterministic behavior and flakiness
in the tests.
Follow up of #1389.
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 thecan stop one stream while keeping another one running
test inConsumerSpec
The text was updated successfully, but these errors were encountered: