wangyang0918 commented on code in PR #165:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/165#discussion_r851862969
##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/controller/RollbackTest.java:
##########
@@ -265,5 +265,28 @@ public void testRollback(
assertTrue(reconciliationStatus.isLastReconciledSpecStable());
assertEquals(ReconciliationState.DEPLOYED,
reconciliationStatus.getState());
assertNull(deployment.getStatus().getError());
+
+ if (deployment.getSpec().getJob() != null) {
+ deployment.getSpec().getJob().setState(JobState.SUSPENDED);
+ testController.reconcile(deployment, context);
+ Thread.sleep(500);
+ testController.reconcile(deployment,
TestUtils.createEmptyContext());
+ testController.reconcile(deployment, context);
+ testController.reconcile(deployment, context);
Review Comment:
I think all the tests could still pass while removing these lines.
##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/controller/RollbackTest.java:
##########
@@ -265,5 +265,28 @@ public void testRollback(
assertTrue(reconciliationStatus.isLastReconciledSpecStable());
assertEquals(ReconciliationState.DEPLOYED,
reconciliationStatus.getState());
assertNull(deployment.getStatus().getError());
+
+ if (deployment.getSpec().getJob() != null) {
Review Comment:
It seems that the tests do not cover the scenario which is suspending from
`ROLLED_BACK` state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]