oleksiyp
10/10/2018, 10:26 AMdarych
10/10/2018, 10:28 AMclearMocks(SecurityContext.getAgentInfo())
to cleanup after each test I receive error
io.mockk.MockKException: can't find stub [aid=AGENT_ID] [org=ORG_ID] [sid=null]
at io.mockk.impl.stub.StubRepository.stubFor(StubRepository.kt:15)
at io.mockk.impl.stub.CommonClearer.clear(CommonClearer.kt:16)
at io.mockk.MockKKt.clearMocks(MockK.kt:654)
at io.mockk.MockKKt.clearMocks$default(MockK.kt:227)
oleksiyp
10/10/2018, 10:29 AMdarych
10/10/2018, 10:30 AMoleksiyp
10/10/2018, 10:30 AMdarych
10/10/2018, 10:32 AMclearStaticMockk
run mockkStatic()
again?oleksiyp
10/10/2018, 10:36 AMdarych
10/10/2018, 10:39 AMoleksiyp
10/10/2018, 12:17 PMdarych
10/10/2018, 1:59 PMfor ((idx, recordedCall) in calls.withIndex()) {
throws ConcurrentModificationException. Do you know who concurrently may change it?
I'm still trying to make small repro for this, but when I'm not debugging this repro everything works fine. It looks like there is some multithread issue, but I can't understand why because I think that everything is running in one threadRecordedCall(retValue=<error "io.mockk.MockKException: Bad recording sequence. Please finalize every { ... } block with returns/answers/just Runs">, retType=Info, isRetValueMock=true matcher=class staticmockk.SecurityContext.getInfo()))
oleksiyp
10/10/2018, 2:15 PMdarych
10/10/2018, 2:17 PMlastCall
is false and debugger shows size = 0mockkStatic
function in each test.oleksiyp
10/10/2018, 2:52 PM