@@ -3311,9 +3311,13 @@ void restageTimeout() {
33113311
33123312 @ Test
33133313 void restartFailurePartial () {
3314- requestApplicationsSpecificState (
3315- this .cloudFoundryClient , "test-app-name" , TEST_SPACE_ID , "STARTED" );
3316- requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STOPPED" );
3314+ requestApplicationsV3 (
3315+ this .cloudFoundryClient ,
3316+ "test-app-name" ,
3317+ TEST_SPACE_ID ,
3318+ "test-application-id" ,
3319+ ApplicationState .STARTED );
3320+ requestStopApplication (this .cloudFoundryClient , "test-application-id" );
33173321 requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STARTED" );
33183322 requestGetApplication (this .cloudFoundryClient , "test-application-id" );
33193323 requestApplicationInstancesFailingPartial (this .cloudFoundryClient , "test-application-id" );
@@ -3331,9 +3335,13 @@ void restartFailurePartial() {
33313335
33323336 @ Test
33333337 void restartFailureTotal () {
3334- requestApplicationsSpecificState (
3335- this .cloudFoundryClient , "test-app-name" , TEST_SPACE_ID , "STARTED" );
3336- requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STOPPED" );
3338+ requestApplicationsV3 (
3339+ this .cloudFoundryClient ,
3340+ "test-app-name" ,
3341+ TEST_SPACE_ID ,
3342+ "test-application-id" ,
3343+ ApplicationState .STARTED );
3344+ requestStopApplication (this .cloudFoundryClient , "test-application-id" );
33373345 requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STARTED" );
33383346 requestGetApplication (this .cloudFoundryClient , "test-application-id" );
33393347 requestApplicationInstancesFailingTotal (this .cloudFoundryClient , "test-application-id" );
@@ -3377,7 +3385,7 @@ void restartInstance() {
33773385
33783386 @ Test
33793387 void restartNoApp () {
3380- requestApplicationsEmpty (
3388+ requestApplicationsEmptyV3 (
33813389 this .cloudFoundryClient , "test-non-existent-app-name" , TEST_SPACE_ID );
33823390
33833391 this .applications
@@ -3396,31 +3404,15 @@ void restartNoApp() {
33963404 .verify (Duration .ofSeconds (5 ));
33973405 }
33983406
3399- @ Test
3400- void restartNotStartedAndNotStopped () {
3401- requestApplicationsSpecificState (
3402- this .cloudFoundryClient , "test-app-name" , TEST_SPACE_ID , "unknown-state" );
3403- requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STOPPED" );
3404- requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STARTED" );
3405- requestGetApplication (this .cloudFoundryClient , "test-application-id" );
3406- requestApplicationInstancesRunning (this .cloudFoundryClient , "test-application-id" );
3407-
3408- StepVerifier .withVirtualTime (
3409- () ->
3410- this .applications .restart (
3411- RestartApplicationRequest .builder ()
3412- .name ("test-app-name" )
3413- .build ()))
3414- .then (() -> VirtualTimeScheduler .get ().advanceTimeBy (Duration .ofSeconds (3 )))
3415- .expectComplete ()
3416- .verify (Duration .ofSeconds (5 ));
3417- }
3418-
34193407 @ Test
34203408 void restartStarted () {
3421- requestApplicationsSpecificState (
3422- this .cloudFoundryClient , "test-app-name" , TEST_SPACE_ID , "STARTED" );
3423- requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STOPPED" );
3409+ requestApplicationsV3 (
3410+ this .cloudFoundryClient ,
3411+ "test-app-name" ,
3412+ TEST_SPACE_ID ,
3413+ "test-application-id" ,
3414+ ApplicationState .STARTED );
3415+ requestStopApplication (this .cloudFoundryClient , "test-application-id" );
34243416 requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STARTED" );
34253417 requestGetApplication (this .cloudFoundryClient , "test-application-id" );
34263418 requestApplicationInstancesRunning (this .cloudFoundryClient , "test-application-id" );
@@ -3438,8 +3430,12 @@ void restartStarted() {
34383430
34393431 @ Test
34403432 void restartStopped () {
3441- requestApplicationsSpecificState (
3442- this .cloudFoundryClient , "test-app-name" , TEST_SPACE_ID , "STOPPED" );
3433+ requestApplicationsV3 (
3434+ this .cloudFoundryClient ,
3435+ "test-app-name" ,
3436+ TEST_SPACE_ID ,
3437+ "test-application-id" ,
3438+ ApplicationState .STOPPED );
34433439 requestUpdateApplicationState (this .cloudFoundryClient , "test-application-id" , "STARTED" );
34443440 requestGetApplication (this .cloudFoundryClient , "test-application-id" );
34453441 requestApplicationInstancesRunning (this .cloudFoundryClient , "test-application-id" );
0 commit comments