Skip to content

Commit 700abc9

Browse files
Changed zone
1 parent 22e50a8 commit 700abc9

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
public class CrudOperationsReservationIT {
5050

5151
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
52-
private static final String ZONE = "us-west1-a";
52+
private static final String ZONE = "us-east4-c";
5353
private static String RESERVATION_NAME;
5454
private static final int NUMBER_OF_VMS = 3;
5555
static String javaVersion = System.getProperty("java.version").substring(0, 2);
@@ -120,4 +120,17 @@ public void testListReservation() throws IOException {
120120
assertThat(reservations).isNotNull();
121121
Assert.assertTrue(reservations.get(0).getName().contains("test-"));
122122
}
123+
124+
@Test
125+
@Order(2)
126+
public void testUpdateVmsForReservation()
127+
throws IOException, ExecutionException, InterruptedException, TimeoutException {
128+
int newNumberOfVms = 5;
129+
UpdateVmsForReservation.updateVmsForReservation(
130+
PROJECT_ID, ZONE, RESERVATION_NAME, newNumberOfVms);
131+
Reservation reservation = GetReservation.getReservation(
132+
PROJECT_ID, RESERVATION_NAME, ZONE);
133+
134+
Assert.assertEquals(newNumberOfVms, reservation.getSpecificReservation().getCount());
135+
}
123136
}

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@
3838
import org.junit.jupiter.api.AfterAll;
3939
import org.junit.jupiter.api.Assertions;
4040
import org.junit.jupiter.api.BeforeAll;
41-
import org.junit.jupiter.api.MethodOrderer;
42-
import org.junit.jupiter.api.Order;
4341
import org.junit.jupiter.api.Test;
44-
import org.junit.jupiter.api.TestMethodOrder;
4542
import org.junit.jupiter.api.Timeout;
4643
import org.junit.runner.RunWith;
4744
import org.junit.runners.JUnit4;
4845

4946
@RunWith(JUnit4.class)
5047
@Timeout(value = 25, unit = TimeUnit.MINUTES)
51-
@TestMethodOrder(MethodOrderer. OrderAnnotation. class)
5248
public class ReservationIT {
5349

5450
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
@@ -156,7 +152,6 @@ public static void cleanup()
156152
}
157153

158154
@Test
159-
@Order(1)
160155
public void testCreateReservationWithGlobalInstanceTemplate()
161156
throws IOException, ExecutionException, InterruptedException, TimeoutException {
162157
CreateReservationForInstanceTemplate.createReservationForInstanceTemplate(
@@ -182,17 +177,4 @@ public void testCreateReservationWithRegionInstanceTemplate()
182177
Assert.assertTrue(reservation.getZone().contains(ZONE));
183178
Assert.assertEquals(RESERVATION_NAME_REGIONAL, reservation.getName());
184179
}
185-
186-
@Test
187-
@Order(2)
188-
public void testUpdateVmsForReservation()
189-
throws IOException, ExecutionException, InterruptedException, TimeoutException {
190-
int newNumberOfVms = 5;
191-
UpdateVmsForReservation.updateVmsForReservation(
192-
PROJECT_ID, ZONE, RESERVATION_NAME_GLOBAL, newNumberOfVms);
193-
Reservation reservation = GetReservation.getReservation(
194-
PROJECT_ID, RESERVATION_NAME_GLOBAL, ZONE);
195-
196-
Assert.assertEquals(newNumberOfVms, reservation.getSpecificReservation().getCount());
197-
}
198180
}

0 commit comments

Comments
 (0)