Skip to content

Commit b512875

Browse files
Fixed ReservationIT
1 parent 977208d commit b512875

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

compute/cloud-client/src/main/java/compute/CreateInstanceBulkInsert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static List<Instance> bulkInsertInstance(String project, String zone, Str
100100
.build();
101101

102102
// Wait for server update
103-
TimeUnit.SECONDS.sleep(60);
103+
TimeUnit.SECONDS.sleep(60);;
104104

105105
return Lists.newArrayList(instancesClient.list(build).iterateAll());
106106
}

compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
public class CrudOperationsReservationIT {
4949

5050
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
51-
private static final String ZONE = "us-east4-c";
51+
private static final String ZONE = "us-west1-a";
5252
private static String RESERVATION_NAME;
5353
private static final int NUMBER_OF_VMS = 3;
5454
static String javaVersion = System.getProperty("java.version").substring(0, 2);
@@ -74,10 +74,10 @@ public static void setUp()
7474
@AfterAll
7575
public static void cleanup()
7676
throws IOException, ExecutionException, InterruptedException, TimeoutException {
77-
// Delete the reservation created for testing.
77+
// Delete all reservations created for testing.
7878
DeleteReservation.deleteReservation(PROJECT_ID, ZONE, RESERVATION_NAME);
7979

80-
// Test that reservation is deleted
80+
// Test that reservations are deleted
8181
Assertions.assertThrows(
8282
NotFoundException.class,
8383
() -> GetReservation.getReservation(PROJECT_ID, RESERVATION_NAME, ZONE));

compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public static void cleanup()
144144
NotFoundException.class,
145145
() -> GetReservation.getReservation(PROJECT_ID, RESERVATION_NAME_REGIONAL, ZONE));
146146

147+
// Close the client after all tests
147148
reservationsClient.close();
148149

149150
stdOut.close();

0 commit comments

Comments
 (0)