I'm testing the behavior of an asynchronous callba...
# kotest
j
I'm testing the behavior of an asynchronous callback-based api. The callback can be called asynchronously by the api multiple times, each time with a result. I'd like to repeatedly check if each result fed to the callback is the expected value. But I'd like to stop doing this once a timeout has been reached. At that time I'd like to fail and exit the test. How may I achieve this in Kotest?
s
So you want to run some code with a timeout ?
Copy code
test("my test").config(timeout = 123.seconds) { ... }
j
Nice! Thank you!