Skip to content

Commit

Permalink
fix: test after rebase on master (#2270)
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <csviri@gmail.com>
  • Loading branch information
csviri authored and metacosm committed Aug 29, 2024
1 parent 2df24c4 commit 4362c53
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ void throwsExceptionWithoutNumberingIfAllDifferentClass() {

@Test
void numbersDependentClassNamesIfMoreOfSameType() {
var res = new WorkflowResult(Map.of(new DependentA(), new RuntimeException(),
new DependentA(), new RuntimeException()));
var res = new WorkflowResult(Map.of(new DependentA("name1"), new RuntimeException(),
new DependentA("name2"), new RuntimeException()));
try {
res.throwAggregateExceptionIfErrorsPresent();
} catch (AggregatedOperatorException e) {
Expand All @@ -39,6 +39,25 @@ void numbersDependentClassNamesIfMoreOfSameType() {

@SuppressWarnings("rawtypes")
static class DependentA implements DependentResource {

private final String name;

public DependentA() {
this(null);
}

public DependentA(String name) {
this.name = name;
}

@Override
public String name() {
if (name == null) {
return DependentResource.super.name();
}
return name;
}

@Override
public ReconcileResult reconcile(HasMetadata primary, Context context) {
return null;
Expand Down

0 comments on commit 4362c53

Please sign in to comment.