@@ -165,10 +165,10 @@ private TestingFlinkBlueGreenDeploymentController.BlueGreenReconciliationResult
165165 assertTrue (rs .updateControl .getScheduleDelay ().isPresent ());
166166
167167 // This next reconciliation should continue waiting on the pending savepoint
168- var rs2 = reconcile (rs .deployment );
168+ rs = reconcile (rs .deployment );
169169
170- assertTrue (rs2 .updateControl .isNoUpdate ());
171- assertTrue (rs2 .updateControl .getScheduleDelay ().isPresent ());
170+ assertTrue (rs .updateControl .isNoUpdate ());
171+ assertTrue (rs .updateControl .getScheduleDelay ().isPresent ());
172172
173173 // Completing the savepoint
174174 triggers .put (rs .deployment .getStatus ().getSavepointTriggerId (), true );
@@ -389,8 +389,8 @@ public void verifyFailureBeforeFirstDeployment(FlinkVersion flinkVersion) throws
389389 assertEquals (JobState .SUSPENDED , flinkDeployments .get (0 ).getSpec ().getJob ().getState ());
390390
391391 // No-op if the spec remains the same
392- var rs2 = reconcile (rs .deployment );
393- assertTrue (rs2 .updateControl .isNoUpdate ());
392+ rs = reconcile (rs .deployment );
393+ assertTrue (rs .updateControl .isNoUpdate ());
394394
395395 simulateChangeInSpec (rs .deployment , "MODIFIED_VALUE" , 0 , null );
396396
@@ -788,10 +788,10 @@ private void assertDeploymentDeleted(
788788 rs .reconciledStatus .getLastReconciledSpec ());
789789
790790 // A reconciliation before the deletion delay has expired should result in no-op
791- var rs2 = reconcile (rs .deployment );
792- var remainingDeletionDelay = rs2 .updateControl .getScheduleDelay ().get ();
791+ rs = reconcile (rs .deployment );
792+ var remainingDeletionDelay = rs .updateControl .getScheduleDelay ().get ();
793793 assertTrue (remainingDeletionDelay <= expectedDeletionDelay );
794- assertTrue (rs2 .updateControl .isNoUpdate ());
794+ assertTrue (rs .updateControl .isNoUpdate ());
795795
796796 Thread .sleep (remainingDeletionDelay );
797797 }
@@ -889,8 +889,12 @@ private TestingFlinkBlueGreenDeploymentController.BlueGreenReconciliationResult
889889
890890 return new TestingFlinkBlueGreenDeploymentController .BlueGreenReconciliationResult (
891891 updateControl ,
892- updateControl .getResource ().orElse (null ),
893- updateControl .isNoUpdate () ? null : updateControl .getResource ().get ().getStatus ());
892+ updateControl .isNoUpdate ()
893+ ? blueGreenDeployment
894+ : updateControl .getResource ().get (),
895+ updateControl .isNoUpdate ()
896+ ? blueGreenDeployment .getStatus ()
897+ : updateControl .getResource ().get ().getStatus ());
894898 }
895899
896900 private void simulateSubmitAndSuccessfulJobStart (FlinkDeployment deployment ) throws Exception {
0 commit comments