gs-async-method icon indicating copy to clipboard operation
gs-async-method copied to clipboard

Missing unit test

Open DevDengChao opened this issue 3 years ago • 0 comments

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/

DevDengChao avatar Jul 28 '22 09:07 DevDengChao