Skip to content

Commit 405c3e1

Browse files
committed
adjusted GatewayHttpReadinessCheck to work with much smaller timeout
1 parent 3dd1cfe commit 405c3e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/GatewayHttpReadinessCheck.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class GatewayHttpReadinessCheck implements Supplier<CompletionStage
3636
*/
3737
public static final String READINESS_ASK_MESSAGE_RESPONSE = "ready";
3838

39-
private static final Duration TIMEOUT = Duration.ofSeconds(30);
39+
private static final Duration TIMEOUT = Duration.ofSeconds(2);
4040

4141
private final ActorSelection rootActor;
4242

@@ -47,6 +47,6 @@ public GatewayHttpReadinessCheck(final ActorSystem system) {
4747
@Override
4848
public CompletionStage<Boolean> get() {
4949
return Patterns.ask(rootActor, READINESS_ASK_MESSAGE, TIMEOUT)
50-
.handle((answer, throwable) -> answer.equals(READINESS_ASK_MESSAGE_RESPONSE));
50+
.handle((answer, throwable) -> READINESS_ASK_MESSAGE_RESPONSE.equals(answer));
5151
}
5252
}

0 commit comments

Comments
 (0)