https://kotlinlang.org logo
#kotest
Title
# kotest
p

phil-t

09/27/2023, 10:06 AM
Hi, I’ve noticed some warnings which say that
eventually()
is deprecated and I want to refactor my code to use the new version of this, but struggling to understand the documentation here - https://kotest.io/docs/assertions/eventually.html I already have the dependency
io.kotest:kotest-assertions-core-jvm:5.7.2
via Gradle, so would like to know does this include a replacement for
eventually()
and is there some documentation for this?
j

John Fletcher

09/27/2023, 12:49 PM
There's an error on that page - it mentions
com.sksamuel.kotest.assertions.nondeterministic
but it actually means
io.kotest.assertions.nondeterministic
So you can use:
io.kotest.assertions.nondeterministic.eventually
I find that the new package works for me. Do you have a concrete problem?
try:
eventually(5.seconds) {...}
p

phil-t

09/27/2023, 12:51 PM
Thanks John I’ll give that a try 👍