Skip to content

Missing unit test #26

@DevDengChao

Description

@DevDengChao

I'm trying to use @Async to do some optimize in my app recently, but I didn't found a proper article/guide to do unit test with @Async methods, eg: If the controller invoked a service's async method, how do I confirm the service's async method is done in controller's unit test. Inject a lock into service object when testing? Override the Executor when testing or something else?

Please add a test case to the project and the guide here https://spring.io/guides/gs/async-method/

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedAn issue the community can handle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions