> +   }
> +
> +   @Test(dependsOnMethods = "testIsAvailable")
> +   public void testCreate() {
> +
> +      CreateStorageServiceParams storage = api().create(NAME, LOCATION, 
> ImmutableMap.of("property_name",
> +              "property_value"), ImmutableMap.of("accountType", 
> StorageService.AccountType.Standard_ZRS.toString()));
> +      while (storage == null) {
> +         try {
> +            Thread.sleep(25 * 1000);
> +         } catch (InterruptedException e) {
> +            e.printStackTrace();
> +         }
> +         storage = api().create(NAME, LOCATION, 
> ImmutableMap.of("property_name", "property_value"),
> +                 ImmutableMap.of("accountType", 
> StorageService.AccountType.Standard_ZRS.toString()));
> +      }

Using `URIParser` and `ParseJobStatus` since this returns 202 then 200 when 
done. 
```java
URI uri = api().create(NAME, LOCATION, ImmutableMap.of("property_name",
              "property_value"), ImmutableMap.of("accountType", 
StorageService.AccountType.Standard_ZRS.toString()));
      if (uri != null){
         assertTrue(uri.toString().contains("api-version"));

         boolean jobDone = Predicates2.retry(new Predicate<URI>() {
            @Override public boolean apply(URI uri) {
               return ParseJobStatus.JobStatus.DONE == 
api.getJobApi().jobStatus(uri);
            }
         }, 60 * 1 * 1000 /* 1 minute timeout */).apply(uri);
         assertTrue(jobDone, "delete operation did not complete in the 
configured timeout");
      }
      final StorageService service = api().get(NAME);
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/259/files/545a9a572a375fa04f8b638e5693bb5bf29471f3#r59809171

Reply via email to