File tree 1 file changed +4
-2
lines changed
sample-operators/leader-election/src/test/java/io/javaoperatorsdk/operator/sample
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ class LeaderElectionE2E {
50
50
// not for local mode by design
51
51
@ EnabledIfSystemProperty (named = "test.deployment" , matches = "remote" )
52
52
void otherInstancesTakesOverWhenSteppingDown () {
53
- log .info ("Deploying operator" );
54
- deployOperatorsInOrder ();
55
53
log .info ("Applying custom resource" );
56
54
applyCustomResource ();
55
+ log .info ("Deploying operator instances" );
56
+ deployOperatorsInOrder ();
57
57
58
58
log .info ("Awaiting custom resource reconciliations" );
59
59
await ().pollDelay (Duration .ofSeconds (MINIMAL_SECONDS_FOR_RENEWAL ))
@@ -131,12 +131,14 @@ void tearDown() {
131
131
}
132
132
133
133
private void deployOperatorsInOrder () {
134
+ log .info ("Installing 1st instance" );
134
135
applyResources ("k8s/operator.yaml" );
135
136
await ().atMost (Duration .ofSeconds (POD_STARTUP_TIMEOUT )).untilAsserted (() -> {
136
137
var pod = client .pods ().inNamespace (namespace ).withName (OPERATOR_1_POD_NAME ).get ();
137
138
assertThat (pod .getStatus ().getContainerStatuses ().get (0 ).getReady ()).isTrue ();
138
139
});
139
140
141
+ log .info ("Installing 2nd instance" );
140
142
applyResources ("k8s/operator-instance-2.yaml" );
141
143
await ().atMost (Duration .ofSeconds (POD_STARTUP_TIMEOUT )).untilAsserted (() -> {
142
144
var pod = client .pods ().inNamespace (namespace ).withName (OPERATOR_2_POD_NAME ).get ();
You can’t perform that action at this time.
0 commit comments