From 63073ae3f46faf507f445be6ef028a3f1bef0263 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Thu, 14 Jan 2010 20:40:39 +0000 Subject: [PATCH] formatting git-svn-id: http://jclouds.googlecode.com/svn/trunk@2655 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../aws/ec2/EBSBootEC2ClientLiveTest.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java index 67bd7346ef..0b219068ba 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/EBSBootEC2ClientLiveTest.java @@ -199,15 +199,14 @@ public class EBSBootEC2ClientLiveTest { while (instance == null) { try { System.out.printf("%d: running instance%n", System.currentTimeMillis()); - instance = client.getInstanceServices().runInstancesInRegion( - Region.DEFAULT, - null, - imageId, - 1, - 1, - withKeyName(keyPair.getKeyName()).asType(InstanceType.M1_SMALL) - .withSecurityGroup(securityGroupName)).getRunningInstances() - .iterator().next(); + Reservation reservation = client.getInstanceServices().runInstancesInRegion( + Region.DEFAULT, null, // allow ec2 to chose an availability zone + imageId, 1, // minimum instances + 1, // maximum instances + withKeyName(keyPair.getKeyName())// key I created above + .asType(InstanceType.M1_SMALL)// smallest instance size + .withSecurityGroup(securityGroupName));// group I created above + instance = Iterables.getOnlyElement(reservation.getRunningInstances()); } catch (HttpResponseException htpe) { if (htpe.getResponse().getStatusCode() == 400) continue;