2222
2323import com .google .api .gax .rpc .NotFoundException ;
2424import com .google .cloud .compute .v1 .Reservation ;
25- import compute .Util ;
2625import java .io .IOException ;
2726import java .util .List ;
2827import java .util .UUID ;
4241@ Timeout (value = 6 , unit = TimeUnit .MINUTES )
4342public class CrudOperationsReservationIT {
4443 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
45- private static final String ZONE = "us-central1-c " ;
44+ private static final String ZONE = "us-central1-a " ;
4645 private static final String RESERVATION_NAME = "test-reservation-" + UUID .randomUUID ();
4746 private static final int NUMBER_OF_VMS = 3 ;
4847
@@ -57,9 +56,6 @@ public static void setUp()
5756 throws IOException , ExecutionException , InterruptedException , TimeoutException {
5857 requireEnvVar ("GOOGLE_APPLICATION_CREDENTIALS" );
5958 requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
60- Util .cleanUpExistingReservations ("test-" , PROJECT_ID , ZONE );
61- Util .cleanUpExistingReservations ("test-" , PROJECT_ID , "us-central1-a" );
62- Util .cleanUpExistingReservations ("test-" , PROJECT_ID , "us-central1-b" );
6359
6460 CreateReservation .createReservation (PROJECT_ID , RESERVATION_NAME , NUMBER_OF_VMS , ZONE );
6561 }
@@ -97,7 +93,7 @@ public void testListReservation() throws IOException {
9793 @ Test
9894 public void testUpdateVmsForReservation ()
9995 throws IOException , ExecutionException , InterruptedException , TimeoutException {
100- int newNumberOfVms = 2 ;
96+ int newNumberOfVms = 1 ;
10197 Reservation reservation = UpdateVmsForReservation .updateVmsForReservation (
10298 PROJECT_ID , ZONE , RESERVATION_NAME , newNumberOfVms );
10399
0 commit comments