diff --git a/fullstack-examples/src/main/java/com/hedera/fullstack/examples/readiness/NodeActiveReadinessCheck.java b/fullstack-examples/src/main/java/com/hedera/fullstack/examples/readiness/NodeActiveReadinessCheck.java index 92f120703..0f103264e 100644 --- a/fullstack-examples/src/main/java/com/hedera/fullstack/examples/readiness/NodeActiveReadinessCheck.java +++ b/fullstack-examples/src/main/java/com/hedera/fullstack/examples/readiness/NodeActiveReadinessCheck.java @@ -21,7 +21,7 @@ public class NodeActiveReadinessCheck implements ReadinessCheck { @Override - public boolean ready() { + public boolean ready(final Deployment deployment) { return true; } } diff --git a/fullstack-examples/src/main/java/module-info.java b/fullstack-examples/src/main/java/module-info.java index da2ebeab9..1a1e7338c 100644 --- a/fullstack-examples/src/main/java/module-info.java +++ b/fullstack-examples/src/main/java/module-info.java @@ -5,5 +5,6 @@ requires com.hedera.fullstack.readiness.api; requires com.hedera.fullstack.monitoring.api; + requires com.hedera.fullstack.test.toolkit; requires com.hedera.fullstack.validator.api; } diff --git a/fullstack-monitoring-api/src/main/java/com/hedera/fullstack/monitoring/api/Monitor.java b/fullstack-monitoring-api/src/main/java/com/hedera/fullstack/monitoring/api/Monitor.java index ad3eb0651..325b028f4 100644 --- a/fullstack-monitoring-api/src/main/java/com/hedera/fullstack/monitoring/api/Monitor.java +++ b/fullstack-monitoring-api/src/main/java/com/hedera/fullstack/monitoring/api/Monitor.java @@ -31,7 +31,7 @@ default Duration checkInterval() { return DEFAULT_CHECK_INTERVAL; } - default boolean appliesTo(Node node) { - return node instanceof ApplicationNode; + default boolean appliesTo(Class> nodeClass) { + return ApplicationNode.class.isAssignableFrom(nodeClass); } } diff --git a/fullstack-readiness-api/src/main/java/com/hedera/fullstack/readiness/api/ReadinessCheck.java b/fullstack-readiness-api/src/main/java/com/hedera/fullstack/readiness/api/ReadinessCheck.java index e7b0feb25..8e93baf2c 100644 --- a/fullstack-readiness-api/src/main/java/com/hedera/fullstack/readiness/api/ReadinessCheck.java +++ b/fullstack-readiness-api/src/main/java/com/hedera/fullstack/readiness/api/ReadinessCheck.java @@ -17,6 +17,7 @@ package com.hedera.fullstack.readiness.api; import com.hedera.fullstack.test.toolkit.api.model.infrastructure.ApplicationNode; +import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Deployment; import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Node; import java.time.Duration; @@ -25,7 +26,7 @@ public interface ReadinessCheck { Duration DEFAULT_CHECK_INTERVAL = Duration.ofSeconds(1); Duration DEFAULT_CHECK_TIMEOUT = Duration.ofSeconds(60); - boolean ready(); + boolean ready(Deployment deployment); default Duration checkInterval() { return DEFAULT_CHECK_INTERVAL; @@ -35,7 +36,7 @@ default Duration checkTimeout() { return DEFAULT_CHECK_TIMEOUT; } - default boolean appliesTo(Node node) { - return node instanceof ApplicationNode; + default boolean appliesTo(Class> nodeClass) { + return ApplicationNode.class.isAssignableFrom(nodeClass); } } diff --git a/fullstack-validator-api/src/main/java/com/hedera/fullstack/validator/api/Validator.java b/fullstack-validator-api/src/main/java/com/hedera/fullstack/validator/api/Validator.java index 42e17f742..9e4f7703a 100644 --- a/fullstack-validator-api/src/main/java/com/hedera/fullstack/validator/api/Validator.java +++ b/fullstack-validator-api/src/main/java/com/hedera/fullstack/validator/api/Validator.java @@ -25,9 +25,8 @@ */ @FunctionalInterface public interface Validator { - - default boolean appliesTo(Node node) { - return node instanceof ApplicationNode; + default boolean appliesTo(Class> nodeClass) { + return ApplicationNode.class.isAssignableFrom(nodeClass); } /**