1

I have TestNg tests and use AbstractTestNGSpringContextTests:

@ContextConfiguration(classes = ContextConfiguration.class)
public class BaseTest extends AbstractTestNGSpringContextTests {
  .......
}

And enabled retry in my config class:

@Configuration
@EnableRetry
public class TestContextConfiguration {
  ...
}

I would like to retry send request method in my service client:

@Service
public class ApiClient {

    @Retryable
    public Response getUser(String name){
        ...
        return response;

But it does not work, no retry happens when the method throwing exception. At the same time it works with jUnit spring test runner. Also Spring AOP works properly with AbstractTestNGSpringContextTests. What could be the problem?

0 Answers0