Hi not too sure if this is the channel i ask about...
# getting-started
h
Hi not too sure if this is the channel i ask about mockk but I want to mock some behavior.
Copy code
fun wait(){
    val timeout= TimeHelper.getNow() + timeoutInterval // <- part of class constructor
    if(processor.getLag() > 0){
        val currentTIme = TimeHelper.getNow() 

        if(currentTime >= timeout){ System.exit(42) }
        Thread.sleep(someTime)
    }
}
Is there a way for me to use mockk to either that
wait()
has executed for x amount of time with
verify(exactly = x) { someProcessor.wait() }
, or
Thread.sleep()
has been sleeping for x number of time? I have something like this in my test class
Copy code
every { processor.getLag() } returns 1
every { TimeHelper.getNow() } returns 100
So after some number of executions
ever{ processor.getLag() } returns 0
to validate that it finishes
e
there is a #mockk channel
h
Ok i'll ask there. thanks