File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sample-operators/leader-election/src/test/java/io/javaoperatorsdk/operator/sample Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class LeaderElectionE2E {
41
41
42
42
private static final String OPERATOR_1_POD_NAME = "leader-election-operator-1" ;
43
43
private static final String OPERATOR_2_POD_NAME = "leader-election-operator-2" ;
44
+ public static final int MINIMAL_EXPECTED_RECONCILIATION = 2 ;
44
45
45
46
private String namespace ;
46
47
private KubernetesClient client ;
@@ -62,7 +63,8 @@ void otherInstancesTakesOverWhenSteppingDown() {
62
63
.inNamespace (namespace ).withName (TEST_RESOURCE_NAME ).get ().getStatus ();
63
64
64
65
assertThat (actualStatus ).isNotNull ();
65
- assertThat (actualStatus .getReconciledBy ()).hasSizeGreaterThan (2 );
66
+ assertThat (actualStatus .getReconciledBy ())
67
+ .hasSizeGreaterThan (MINIMAL_EXPECTED_RECONCILIATION );
66
68
});
67
69
68
70
client .pods ().inNamespace (namespace ).withName (OPERATOR_1_POD_NAME ).delete ();
@@ -78,7 +80,8 @@ void otherInstancesTakesOverWhenSteppingDown() {
78
80
.inNamespace (namespace ).withName (TEST_RESOURCE_NAME ).get ().getStatus ();
79
81
80
82
assertThat (actualStatus ).isNotNull ();
81
- assertThat (actualStatus .getReconciledBy ()).hasSizeGreaterThan (actualListSize + 2 );
83
+ assertThat (actualStatus .getReconciledBy ())
84
+ .hasSizeGreaterThan (actualListSize + MINIMAL_EXPECTED_RECONCILIATION );
82
85
});
83
86
84
87
assertReconciliations (
You can’t perform that action at this time.
0 commit comments