Skip to content

Commit

Permalink
Modify feeding BooleanSupplier and ontTimeout Runnable to waitUntil m…
Browse files Browse the repository at this point in the history
…ethod (#21)
  • Loading branch information
obabec authored Feb 29, 2024
1 parent c259c02 commit a860edf
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ public final <T extends HasMetadata> boolean waitResourceCondition(T resource, R
() -> {
T res = getKubeClient().getClient().resource(resource).get();
resourceReady[0] = condition.getPredicate().test(res);
if (!resourceReady[0]) {
if (type == null) {
client.getClient().resource(resource).delete();
} else {
type.delete(res.getMetadata().getName());
}
}
return resourceReady[0];
},
() -> {
T res = getKubeClient().getClient().resource(resource).get();
if (type == null) {
client.getClient().resource(resource).delete();
} else {
type.delete(res.getMetadata().getName());
}
});

return resourceReady[0];
Expand Down

0 comments on commit a860edf

Please sign in to comment.