title: @Retryable not making retries when triggered by Integration tests In A Spring Boot Application
body: <p>I have a simple method in a Service in a SpringBoot Application. I have the retry mechanism setup for that method using @Retryable.<br>
  I am trying integration tests for the method in the service and the retries are not happening when the method throws an exception. The method gets executed only once.   </p>
  
  <pre><code>public interface ActionService { 
  
  @Retryable(maxAttempts = 3, backoff = @Backoff(delay = 2000))
  public void perform() throws Exception;
  
  }
  
  
  
  @Service
  public class ActionServiceImpl implements ActionService {
  
  @Override   
  public void perform() throws Exception() {
  
     throw new Exception();
    } 
  }
  
  
  
  @SpringBootApplication
  @Import(RetryConfig.class)
  public class MyApp {
  
  public static void main(String[] args) throws Exception {
      SpringApplication.run(MyApp.class, args);
    }
  }
  
  
  
  @Configuration
  @EnableRetry
  public class RetryConfig {
  
  @Bean
  public ActionService actionService() { return new ActionServiceImpl(); }
  
  }
  
  
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration( classes= {MyApp.class}) 
  @IntegrationTest({"server.port:0", "management.port:0"})
  public class MyAppIntegrationTest {
  
  @Autowired
  private ActionService actionService;
  
  public void testAction() {
  
    actionService.perform();
  
  }
  </code></pre>