Skip to content

Commit 0a25484

Browse files
committed
fix: test after rebase on master (#2270)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 5a45f90 commit 0a25484

File tree

1 file changed

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

1 file changed

+21
-2
lines changed

Diff for: operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/dependent/workflow/WorkflowResultTest.java

+21-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ void throwsExceptionWithoutNumberingIfAllDifferentClass() {
2828

2929
@Test
3030
void numbersDependentClassNamesIfMoreOfSameType() {
31-
var res = new WorkflowResult(Map.of(new DependentA(), new RuntimeException(),
32-
new DependentA(), new RuntimeException()));
31+
var res = new WorkflowResult(Map.of(new DependentA("name1"), new RuntimeException(),
32+
new DependentA("name2"), new RuntimeException()));
3333
try {
3434
res.throwAggregateExceptionIfErrorsPresent();
3535
} catch (AggregatedOperatorException e) {
@@ -39,6 +39,25 @@ void numbersDependentClassNamesIfMoreOfSameType() {
3939

4040
@SuppressWarnings("rawtypes")
4141
static class DependentA implements DependentResource {
42+
43+
private final String name;
44+
45+
public DependentA() {
46+
this(null);
47+
}
48+
49+
public DependentA(String name) {
50+
this.name = name;
51+
}
52+
53+
@Override
54+
public String name() {
55+
if (name == null) {
56+
return DependentResource.super.name();
57+
}
58+
return name;
59+
}
60+
4261
@Override
4362
public ReconcileResult reconcile(HasMetadata primary, Context context) {
4463
return null;

0 commit comments

Comments
 (0)