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 AMoleksiyp
10/10/2018, 10:30 AMoleksiyp
10/10/2018, 10:30 AMoleksiyp
10/10/2018, 10:30 AMdarych
10/10/2018, 10:30 AMoleksiyp
10/10/2018, 10:30 AMoleksiyp
10/10/2018, 10:31 AMoleksiyp
10/10/2018, 10:32 AMdarych
10/10/2018, 10:32 AMdarych
10/10/2018, 10:33 AMclearStaticMockk
run mockkStatic()
again?darych
10/10/2018, 10:36 AMoleksiyp
10/10/2018, 10:36 AMoleksiyp
10/10/2018, 10:37 AMoleksiyp
10/10/2018, 10:37 AMoleksiyp
10/10/2018, 10:38 AMoleksiyp
10/10/2018, 10:38 AMoleksiyp
10/10/2018, 10:39 AMdarych
10/10/2018, 10:39 AMdarych
10/10/2018, 12:15 PMoleksiyp
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 threaddarych
10/10/2018, 2:13 PMRecordedCall(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()))
darych
10/10/2018, 2:14 PMoleksiyp
10/10/2018, 2:15 PMoleksiyp
10/10/2018, 2:15 PMdarych
10/10/2018, 2:17 PMlastCall
is false and debugger shows size = 0darych
10/10/2018, 2:20 PMmockkStatic
function in each test.darych
10/10/2018, 2:45 PMoleksiyp
10/10/2018, 2:52 PM