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
I'm calling a verify(timeout = 3_000, exactly = 3) { mock.offer(any()) }
and I'm getting:
java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
at io.mockk.impl.verify.UnorderedCallVerifier.matchCall(UnorderedCallVerifier.kt:110)
at io.mockk.impl.verify.UnorderedCallVerifier.verify(UnorderedCallVerifier.kt:40)
at io.mockk.impl.verify.TimeoutVerifier.verify(TimeoutVerifier.kt:22)
at io.mockk.impl.recording.states.VerifyingState$recordingDone$outcome$1.invoke(VerifyingState.kt:31)
at io.mockk.impl.recording.states.VerifyingState$recordingDone$outcome$1.invoke(VerifyingState.kt:30)
at io.mockk.impl.recording.CommonCallRecorder.safeExec(CommonCallRecorder.kt:72)
at io.mockk.impl.recording.states.VerifyingState.recordingDone(VerifyingState.kt:30)
at io.mockk.impl.recording.CommonCallRecorder.done(CommonCallRecorder.kt:47)
at io.mockk.impl.eval.RecordedBlockEvaluator.record(RecordedBlockEvaluator.kt:63)
at io.mockk.impl.eval.VerifyBlockEvaluator.verify(VerifyBlockEvaluator.kt:30)
at io.mockk.MockKDsl.internalVerify(API.kt:120)
at io.mockk.MockKKt.verify(MockK.kt:218)
at io.mockk.MockKKt.verify$default(MockK.kt:209)
Method signature is @NotNull Resp offer(@NotNull Req req) and it is mocked with
val capture = CopyOnWriteArrayList<Req>()
mock.apply {
every { offer(capture(capture)) } answers {
...
Resp()
}
Nothing special IMO. I can't reproduce it but hope the above helps.
MockK version: 1.13.9
OS: Linux
Kotlin version: 1.9.21
JDK version: 17
The text was updated successfully, but these errors were encountered:
I'm calling a
verify(timeout = 3_000, exactly = 3) { mock.offer(any()) }
and I'm getting:
Method signature is
@NotNull Resp offer(@NotNull Req req)
and it is mocked withNothing special IMO. I can't reproduce it but hope the above helps.
The text was updated successfully, but these errors were encountered: