title: com.netflix.hystrix.exception.HystrixRuntimeException: execute timed-out and no fallback available
body: <p>I am writing an test class for Integration Testing using groovy file</p>
  
  <p>My Groovy File : </p>
  
  <pre><code>@UseModules(value = [MiddleModule])
  class MiddleServiceIT extends Specification{
  
  
  @Inject
  MiddleService middleService
  
  @Rule
  public WireMockRule Server = new WireMockRule(wireMockConfig().port(9090));
  
  
  def 'validate config'() {
      expect:
      middleService != null
  }
  
  def 'validate get'() {
  
     /* String urlPath = 'http://localhost:8889/middle/?acctID=80873000101&amp;vodSource=ais&amp;headendID=louis&amp;activeOnly=true&amp;limit=50&amp;startDate=2014-10-09&amp;inclNonSyncData=test' */
  
     String urlPath = 'http://localhost:8889/middle/'
      given:
              Server.stubFor(get(urlPathEqualTo(urlPath)).willReturn(MiddleServiceStub.buildSuccess()))
      when:
      MiddleMessage response = middleService.get( '80873000101','ais', 'louis', 'true', '50', '2014-10-09', 'test')
  
      then:
      response != null
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Here my requirement is when it hits that URL, it has to give the response which I mentioned in the stubFor call.</p>
  
  <p>My Original Method : </p>
  
  <pre><code>@Override
  public MiddleMessage get(String acctID, String vodSource, String headendID, String activeOnly, String limit, String startDate, String inclNonSyncData){
     String url = rentalsMiddleBaseUrl +  "/?acctID=" + acctID +  "&amp;vodSource=" + vodSource +  "&amp;headendID=" + headendID +  "&amp;activeOnly=" + activeOnly +  "&amp;limit=" + limit +  "&amp;startDate=" + startDate +  "&amp;inclNonSyncData=" + inclNonSyncData;
     System.out.println("***** For Test URL "+url);
     return (MiddleMessage) commandBuilder.build(url,MiddleMessage.class).execute();
  }
  </code></pre>
  
  <p>My Stub Method in MiddleServiceStub Class: </p>
  
  <pre><code>public static ResponseDefinitionBuilder buildSuccess() throws JsonProcessingException {
      ObjectMapper mapper = new ObjectMapper();
       MiddleSet middleSet = new MiddleSet();
      MiddleMessage middleMessage = new MiddleMessage();
      middleMessage.setMiddleSet(middleSet);
      String json = mapper.writeValueAsString(middleMessage);
      ResponseDefinitionBuilder responseDefinitionBuilder = ResponseDefinitionBuilder.like(ResponseDefinition.created()).withBody(json);
  
      return responseDefinitionBuilder;
  }
  </code></pre>
  
  <p>When I run the above code using maven command "clean install" it is giving the following exception</p>
  
  <pre><code>validate get(com.config.MiddleServiceTest)  Time elapsed: 1.918 sec  &lt;&lt;&lt; ERROR!
  
  com.netflix.hystrix.exception.HystrixRuntimeException: execute timed-out and no fallback available.
  at com.netflix.hystrix.HystrixCommand.getFallbackOrThrowException(HystrixCommand.java:1646)
  at com.netflix.hystrix.HystrixCommand.access$1900(HystrixCommand.java:103)
  at com.netflix.hystrix.HystrixCommand$TimeoutObservable$1$1.run(HystrixCommand.java:1023)
  at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable$1.call(HystrixContextRunnable.java:41)
  at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable$1.call(HystrixContextRunnable.java:37)
  at com.netflix.hystrix.strategy.concurrency.HystrixContextRunnable.run(HystrixContextRunnable.java:57)
  at com.netflix.hystrix.HystrixCommand$TimeoutObservable$1$2.tick(HystrixCommand.java:1047)
  at com.netflix.hystrix.HystrixCommand$1.performBlockingGetWithTimeout(HystrixCommand.java:627)
  at com.netflix.hystrix.HystrixCommand$1.get(HystrixCommand.java:522)
  at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:431)
  at com.client.MiddleService.get(MiddleService.java:72)
  at com.config.MiddleServiceTest.validate get(MiddleServiceTest.groovy:22)
  Caused by: java.util.concurrent.TimeoutException
  </code></pre>