gs-async-method
gs-async-method copied to clipboard
Missing unit test
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/