Skip to content

NativeTest (aotTestClasses) fails on the mock bean. #37480

Closed as not planned
Closed as not planned
@hadson172

Description

@hadson172

My tests contain the following mock :

    @MockkBean
    lateinit var myService: MyService

@MockkBean is from package import com.ninjasquad.springmockk.MockkBean

When i run ./gradlew aotTestClasesses I am getting error:

Caused by: java.lang.IllegalArgumentException: Failed to generate code for '[MockkDefinition@72f855b9 name = [null], typeToMock = com.myApp.MyService, extraInterfaces = set[[empty]], clear = AFTER]' with type ?

It may be problem with mockkbean dependency but I am wondering if there is any workaround for this from spring/graalvm side?
Thanks
Spring boot 3.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions