> + private Server createServer(String regionId, String availabilityZoneId,
> boolean shouldWork) {
> + ServerApi serverApi = api.getServerApiForZone(regionId);
> + CreateServerOptions options = new CreateServerOptions();
> + // options = options.availabilityZone(availabilityZoneId);
> + ServerCreated server = serverApi.create(hostName,
> imageIdForZone(regionId), flavorRefForZone(regionId), options);
> + if (shouldWork) {
> + blockUntilServerInState(server.getId(), serverApi,
> Server.Status.ACTIVE);
> + } else {
> + blockUntilServerInState(server.getId(), serverApi,
> Server.Status.ERROR);
> + }
> +
> + return serverApi.get(server.getId());
> + }
> +
> + @Test
> + public void testCreateInAvailabilityZone() {
I ran this test against a DevStack install and it endlessly waited for a server
that became ACTIVE to go into the ERROR state (which it never would).
What's the purpose of this test? Is it even necessary?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984354