Skip to content

Commit 6162a24

Browse files
committed
addtional test
1 parent 23a1fc0 commit 6162a24

File tree

1 file changed

+19
-0
lines changed
  • operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/dependent/workflow

1 file changed

+19
-0
lines changed

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/dependent/workflow/WorkflowTest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,25 @@ void readyConditionNotMetInOneParent() {
307307
assertThat(executionHistory).reconciled(dr1, dr2).notReconciled(dr3);
308308
}
309309

310+
@Test
311+
void diamondShareWithReadyCondition() {
312+
TestDependent dr3 = new TestDependent("DR_3");
313+
TestDependent dr4 = new TestDependent("DR_4");
314+
315+
var workflow = new WorkflowBuilder<TestCustomResource>()
316+
.addDependent(dr1).build()
317+
.addDependent(dr2).dependsOn(dr1).withReadyCondition(notMetReadyCondition).build()
318+
.addDependent(dr3).dependsOn(dr1).build()
319+
.addDependent(dr4).dependsOn(dr2,dr3).build()
320+
.build();
321+
322+
workflow.reconcile(new TestCustomResource(), null);
323+
324+
assertThat(executionHistory).reconciledInOrder(dr1, dr2)
325+
.reconciledInOrder(dr1, dr3)
326+
.notReconciled(dr4);
327+
}
328+
310329
private class TestDependent implements DependentResource<String, TestCustomResource> {
311330

312331
private String name;

0 commit comments

Comments
 (0)