3131import java .util .concurrent .TimeUnit ;
3232import java .util .concurrent .TimeoutException ;
3333import org .junit .Assert ;
34+ import org .junit .FixMethodOrder ;
3435import org .junit .jupiter .api .AfterAll ;
3536import org .junit .jupiter .api .Assertions ;
3637import org .junit .jupiter .api .BeforeAll ;
3738import org .junit .jupiter .api .Test ;
3839import org .junit .jupiter .api .Timeout ;
3940import org .junit .runner .RunWith ;
4041import org .junit .runners .JUnit4 ;
41-
42+ import org . junit . runners . MethodSorters ;
4243
4344@ RunWith (JUnit4 .class )
4445@ Timeout (value = 25 , unit = TimeUnit .MINUTES )
46+ @ FixMethodOrder (MethodSorters .NAME_ASCENDING )
4547public class CrudOperationReservationIT {
4648
4749 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
@@ -89,7 +91,7 @@ public static void cleanup()
8991 }
9092
9193 @ Test
92- public void testGetReservation ()
94+ public void firstGetReservationTest ()
9395 throws IOException {
9496 Reservation reservation = GetReservation .getReservation (
9597 PROJECT_ID , RESERVATION_NAME , ZONE );
@@ -99,7 +101,7 @@ public void testGetReservation()
99101 }
100102
101103 @ Test
102- public void testListReservation () throws IOException {
104+ public void secondListReservationTest () throws IOException {
103105 List <Reservation > reservations =
104106 ListReservations .listReservations (PROJECT_ID , ZONE );
105107
@@ -108,7 +110,7 @@ public void testListReservation() throws IOException {
108110 }
109111
110112 @ Test
111- public void testUpdateVmsForReservation ()
113+ public void thirdUpdateVmsForReservationTest ()
112114 throws IOException , ExecutionException , InterruptedException , TimeoutException {
113115 TimeUnit .MINUTES .sleep (2 );
114116 int newNumberOfVms = 5 ;
0 commit comments