12

I have a method annotated with @Async say

@Async
public void makeFood() {}

but I'm just trying to test the logic of that method. Is it possible to test it synchronously?

ssgao
  • 5,151
  • 6
  • 36
  • 52

1 Answers1

11

Yes, as long as your configuration does not have @EnableAsync, the method will be executed synchronously.

jny
  • 8,007
  • 3
  • 37
  • 56