> +      
> +      try {
> +         api.createServer( Server.Request.CreatePayload.create( 
> "some-datacenter-id", "node1", 99, 12800) );
> +         fail( "Request should have failed.");
> +      } catch (Exception ex){
> +         assertTrue(ex instanceof InsufficientResourcesException, "Exception 
> should be InsufficientResourcesException");
> +      } finally {
> +         pbApi.close();
> +         server.shutdown();
> +      }
> +   }
> +   
> +   @Test
> +   public void testServiceUnderMaintenance() throws Exception {
> +      MockWebServer server = mockWebServer();
> +      for ( int i = 0; i <= MAX_RETRIES; i++ )  // jclouds retries 5 times

You can set the `Constants.PROPERTY_MAX_RETRIES` property when building the 
context to a lower value if you don't need all those 5 retries.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/128/files#r23725908

Reply via email to