If you want to test it for independence and be sure how it behaves, then you can have @Transactional @Service, then another service that uses the transaction alone and simply adds the iterations.
In this case, no matter how you test, you rely on undocumented behavior (how exactly annotation processing is ordered). This may change between minor releases based on the order in which independent Spring beans are created, etc. In other words, you are having trouble mixing @Transactional and @Retry with the same method.
edit: there is a similar answer to the question fooobar.com/questions/339934 / ... with code
@Retryable(StaleStateException.class) @Transactional public void doSomethingWithFoo(Long fooId){
In this case, everything seems to be in order, because no matter what order (try again, transaction or transaction, or try again), the observed behavior will be the same.
source share